: vlan priority handling in WMM
I would like to manage the VLAN priority in Wireless QOS (WMM).
I get the VLAN tag from skb->vlan_tci and I extract the VLAN priority.
How I should handle the priority value 0.
- Handle this value as no priority request, In this case the frame will sent with the DSCP priority or default (Best effort)
- Handle this value as a lowest priority, in this case I Map it to the WMM.
For your information, you can found below a discussion on this point with Johannes Berg.
Regards.
Cedric Voncken.
-----Message d'origine-----
De : Johannes Berg [mailto:[email protected]] Envoyé : lundi 8 juillet 2013 14:16
À : voncken
Cc : [email protected]
Objet : Re: [PATCH V2] vlan priority handling in WMM
Quoted 17 lines · voncken
Quoted 1 line
Quoted 1 line
The vlan Tag contain three bit for priority. The value 0 indicate
no
Quoted 1 line
Quoted 1 line
priority (on this case the VLAN tag contain only VID). The
vlan_tciQuoted 1 line
Quoted 1 line
field is set to zero if the frame do not contain the vlan tag. So
if
Quoted 1 line
Quoted 1 line
we have not a vlan tag or no priority in VLAN tag the priority
value
Quoted 5 lines
Quoted 1 line
is always 0.
Yes but don't we know that the
vlan_tcifield is valid?I don't think you're correct in that 0 means "no priority present",
it actually means "best effort" as far as I can tell. Ignoring the VLAN tag when the field is 0 would mean we could use a higher priority from the contents of the frame, which would not be desired?
Quoted 5 lines
I can add a test with the macro
vlan_tx_tag_present()to verify if thevlan_tcifield is valid.
I test the value 0 to skip the VLAN priority and use the dscp priority in this case. The priority 0 in VLAN tag is often use to turn off the QOS, because not bit is allowed for it.
What do you mean by "is often used"? I don't see how that would be the case? Are you saying routers commonly ignore the VLAN priority value if it's 0? That would seem odd?
Quoted 2 lines
For me is it correct. Nevertheless, if you prefer, I can test only the
vlan_tcivalidity and in this case always use the VLAN priority.
I don't know! Since you don't seem to really know either, we should ask somebody who knows, I think. Maybe you should Cc netdev with this question on the patch or so?
Quoted 2 lines
Sorry I made a mistake
0xE000>>13 =0x0007and not0x0003, and 7 is a 3 bits value.
Ah yes, I made the same mistake, sorry.
johannes