From: "voncken" <cedric.voncken@acksys.fr>
To: "'Johannes Berg'" <johannes@sipsolutions.net>
Cc: <linux-wireless@vger.kernel.org>
Subject: RE: [PATCH V2] vlan priority handling in WMM
Date: Mon, 8 Jul 2013 12:39:08 +0200 [thread overview]
Message-ID: <006c01ce7bc7$608c2a30$21a47e90$@acksys.fr> (raw)
In-Reply-To: <1373273460.8312.3.camel@jlt4.sipsolutions.net>
> > The vlan Tag contain three bit for priority. The value 0 indicate no
> > priority (on this case the VLAN tag contain only VID). The vlan_tci
> > field is set to zero if the frame do not contain the vlan tag. So if
> > we have not a vlan tag or no priority in VLAN tag the priority value
> > is always 0.
> Yes but don't we know that the vlan_tci field 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?
I can add a test with the macro vlan_tx_tag_present() to verify if the vlan_tci field 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.
For me is it correct. Nevertheless, if you prefer, I can test only the vlan_tci validity and in this case always use the VLAN priority.
> > Sorry but I don't understand. The vlan_tci field it is a __u16 value
> > (defined in include/linux/skbuff.h), the VLAN_PRIO_MASK is set to
> > 0xE000 and VLAN_PRIO_SHIFT is set to 13 (defined in
> > include/linux/if_vlan.h), the vlan_priority is an unsigned char. For
> > me the vlan_priority contain a 3-bit value (0xE000 >>13 = 0x0003), why
> > 2 ?
> Umm? No? Think again about what hweight(0x0003) is.
Sorry I made a mistake 0xE000 >>13 = 0x0007 and not 0x0003, and 7 is a 3 bits value.
Cedric
next prev parent reply other threads:[~2013-07-08 10:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-27 7:52 [PATCH V2] vlan priority handling in WMM cedric.voncken
2013-07-01 7:25 ` voncken
2013-07-04 7:18 ` voncken
2013-07-04 7:46 ` Johannes Berg
2013-07-04 7:59 ` voncken
2013-07-05 9:57 ` Johannes Berg
2013-07-05 9:59 ` Johannes Berg
2013-07-05 14:39 ` voncken
2013-07-08 8:51 ` Johannes Berg
2013-07-08 10:39 ` voncken [this message]
2013-07-08 12:15 ` Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='006c01ce7bc7$608c2a30$21a47e90$@acksys.fr' \
--to=cedric.voncken@acksys.fr \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).