Subject: [tsvwg] Fwd: draft-ietf-tsvwg-ieee-802-11-01 review

From: Gorry Fairhurst <[email-masked]>
Date: Fri, 24 Feb 2017 13:00:22 +0000

Here is some feedback from Tom Jones. This may help in closing the WGLC 
reviews for the draft-ietf-tsvwg-ieee-802-11-01, authors please consider
this as a late WGLC comment.

Gorry

-------- Forwarded Message --------

Hi Gorry,

As requested, I have reviewed draft-ietf-tsvwg-ieee-802-11-01, you asked
me to specifically look at the Appendix describing 80211 QoS. From a
close read and referring to some standards material on the DCF I am
happy with your explanation of how this works.

In addition I wanted to verify against a code base that the mappings
were operating correctly. I have included a comparison to the FreeBSD
80211 stack, which agrees with your description.

2.1.  Default DSCP-to-UP Mappings and Conflicts

" While no explicit guidance is offered in mapping (6-Bit) Layer 3 DSCP
values to (3-Bit) Layer 2 markings (such as IEEE 802.1D, 802.1p or
802.11e), a common practice in the networking industry is to map these 
by what we will refer to as 'Default DSCP-to-UP Mapping' (for lack of a
better term), wherein the 3 Most Significant Bits (MSB) of the DSCP are
transcribed to generate the corresponding L2 markings. "

Conversion from DSCP to AC:
FreeBSD:
	Generates the the AC by shifting down the TOS field five places

	if (eh->ether_type == htons(ETHERTYPE_IP)) {
		uint8_t tos;
		/*
		 * IP frame, map the DSCP bits from the TOS field.
		 */
		/* NB: ip header may not be in first mbuf */
		m_copydata(m, sizeof(struct ether_header) +
			offsetof(struct ip, ip_tos), sizeof(tos), &tos);
		tos >>= 5;      /* NB: ECN + low 3 bits of DSCP */
		d_wme_ac = TID_TO_WME_AC(tos);
	} else {
	...

	in

	ieee80211_classify
	https://github.com/freebsd/freebsd/blob/e5f23e316cc39affdeb94c2f8a9cf2eb581d18a5/sys/net80211/ieee80211_output.c#L1002

	The resulting 3 bit value is then mapped to the AC with:

	#define TID_TO_WME_AC(_tid) (      \
		((_tid) == 0 || (_tid) == 3) ? WME_AC_BE : \
		((_tid) < 3) ? WME_AC_BK : \
		((_tid) < 6) ? WME_AC_VI : \
		WME_AC_VO)

	TID_TO_WME_AC
	https://github.com/freebsd/freebsd/blob/8e0917e51f5177df86705e80e9927103aaffb65a/sys/net80211/ieee80211.h#L318

	If the packet has a vlan tag, its priority is captured
   	and converted to a AC.

	The final returned AC is the highest between the vlan tag
         and the DSCPfield value.

4.2.9.  Standard Service Class

- Typo?
OLD:
    The Standard Service Class loosely corresponds to the 802.11 Best
    Effort Access Category (AC_BK)
NEW:
    The Standard Service Class loosely corresponds to the
    802.11 Best Effort Access Category (AC_BK)
                      ^^^^^^^

- [tj]