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.
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...
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.
"Gammaraman" <Gamma...@discussions.microsoft.com> wrote in message
news:6802E59F-A184-47D3...@microsoft.com...