Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

NDIS_PACKET_8021Q_INFO

1 view
Skip to first unread message

Gammaraman

unread,
Aug 8, 2008, 9:36:01 PM8/8/08
to
Hi,

Here is a snippet I found on MSDN on how to get the UserPriority and VlanID
fields from the OOB of a NDIS packet.

NDIS_PACKET_8021Q_INFO VlanPriInfo;
UINT32 UserPriority;
UINT32 VlanID;
VlanPriInfo.Value =
NDIS_PER_PACKET_INFO_FROM_PACKET(pPacketDesc, Ieee8021QInfo);
UserPriority = VlanPriInfo.TagHeader.UserPriority;
VlanID = VlanPriInfo.TagHeader.VlanId;

My question is what is the behavior of this snippet if NDIS did not populate
the Ieee8021Qinfo part of the OOB? Is there someway the miniport driver can
check/know whether NDIS populated this part of the OOB so that if it is not
populated, it can inspect the TOS field of the IPv4 header for packet
classification instead?

Thanks.

Peter

unread,
Aug 8, 2008, 10:45:51 PM8/8/08
to
It sounds like this is a question regarding the send path, but I'm a bit
confused by the question. In the snippet below, if UserPrority == 0, then
there is no OOB 802.1p setting and you can check the IP TOS field for the
DSCP value. If UserPriority == 0, then neither NDIS nor any IM driver
populated the OOB data.

However, are you asking about precedence (i.e., if UserPriority != 0, then
use that and don't use DSCP)? That's a tough one and I'm not sure there is a
clear answer. IMHO, I would inspect DSCP first and use that if it is
non-zero before checking 802.1p, since DSCP is not limited to the local
LAN/subnet and should be carried across hops (as opposed to 802.1p tags).

"Gammaraman" <Gamma...@discussions.microsoft.com> wrote in message
news:341FB44D-4F86-4833...@microsoft.com...

Gammaraman

unread,
Aug 8, 2008, 11:40:01 PM8/8/08
to
Thanks, Peter. As always, I appreciate your help.

Sorry for not being more specific. Yes, this is on the send side.

To provide some more context, I am trying to perform WMM classification in
my WLAN miniport and I only need to take care of the classification on the
uplink.

I think for my specific case inspecting the UserPriority from the OOB is
more efficient as I wouldn't need to exercise the logic to find the IP header
(which could be at different offsets based on Ethernet-II framing/802.3
framing with LLC+SNAP/802.3 framing with LLC+SNAP+802.1Q (when in-band), etc.)

My doubt is how can miniport driver tell the difference between when an
application specified UP=0 and when it did not specify any UP (but specified
a DSCP)? If we could tell the difference, then in the first case we don't
need to look at DSCP whereas in second case we would.

If there is no way to tell the difference, then we could (as you mention)
first check for UP from OOB always. If 0, then check the DSCP to decide what
to do. If UP!=0, the just use the UP itself.

Peter

unread,
Aug 9, 2008, 1:40:22 PM8/9/08
to
AFAIK, there is nothing in the OOB data to indicate whether the 0-value of
the Ieee8021QInfo data was or was not set by an application. I believe that
most WLAN miniports (at least the ones that I have worked on) rely on
DSCP-WMM mapping.

"Gammaraman" <Gamma...@discussions.microsoft.com> wrote in message

news:6802E59F-A184-47D3...@microsoft.com...

Gammaraman

unread,
Aug 9, 2008, 4:41:01 PM8/9/08
to
Thanks, Peter.
0 new messages