Driver Problems? Questions? Issues?
Put OSR's experience to work for you! Contact us for assistance with:
  • Creating the right design for your requirements
  • Reviewing your existing driver code
  • Analyzing driver reliability/performance issues
  • Custom training mixed with consulting and focused directly on your specific areas of interest/concern.
Check us out. OSR, the Windows driver experts.

Upcoming OSR Seminars:

Writing WDF Drivers I: Core Concepts, Nashua, NH 15-19 May, 2017
Writing WDF Drivers II: Advanced Implementation Tech., Nashua, NH 23-26 May, 2017
Kernel Debugging and Crash Analysis, Dulles, VA 26-30 June, 2017
Windows Internals & Software Driver Development, Nashua, NH 24-28 July, 2017


Go Back   OSR Online Lists > ntdev
Welcome, Guest
You must login to post to this list
  Message 1 of 6  
16 Mar 17 09:42
vinay kp
xxxxxx@gmail.com
Join Date: 15 Dec 2016
Posts To This List: 182
Can't get correct packet during Receive NetBuffer list function

I am testing driver for HLK certification and during this test , i am trying to implement the 802.1p tagging . I am trying to capture 802.1 p information over filter driver sendnetBufferList . When HLK run the test , i can able to see the 802.1 p values in supported device . I am printing these values by , NDIS_NET_BUFFER_LIST_8021Q_INFO NdisPacket8021qInfo; NdisPacket8021qInfo.Value = NET_BUFFER_LIST_INFO(NetBufferList, Ieee8021QNetBufferListInfo); printing === > NdisPacket8021qInfo.TagHeader.UserPriority I can see in debug logs when HLK run the 2c_priority test : NdisPacket8021qInfo.TagHeader.UserPriority = 1 NdisPacket8021qInfo.TagHeader.UserPriority = 5 NdisPacket8021qInfo.TagHeader.UserPriority = 5 NdisPacket8021qInfo.TagHeader.UserPriority = 4 NdisPacket8021qInfo.TagHeader.UserPriority = 5 NdisPacket8021qInfo.TagHeader.UserPriority = 6 .... ... etc.. up to 100 packets But i am not adding this values to Ethernet frame manually in code . So Next , during the HLK test , i tried to print the same values in receive Netbuffe List side . But i didn't get any priority packets . I also tried to get TPID . I didn't . NdisPacket8021qInfo.TagHeader.UserPriority = 0 So my doubts are : 1 . Should HLK Send this packets with priority values directly to Ethernet frame with TPID ? Or should i insert these values inside the Ethernet header manually in code ? 2 . If it is manually , How can i modify the NetBufferList . That means , how can i add more memory to the NET_BUFFER with Allocate Space for Ethernet , VLAN tag header and Netbuffer context ? Any samples link available ?
  Message 2 of 6  
16 Mar 17 17:20
Pavel A
xxxxxx@fastmail.fm
Join Date: 21 Jul 2008
Posts To This List: 2377
Can't get correct packet during Receive NetBuffer list function

> Or should i insert these values inside the Ethernet header manually in code ? This depends on capability of your underlying physical driver. If it supports "out-of-band" 8021q info, you can pass it down in the NET_BUFFER_LIST_INFO. If that driver is "dumb", you'll need to append the tag manually to the L2 header. (If I remember correctly, NDIS6 now requires support for out-of-band info, so try this first, you may be lucky). Again, I don't remember what is your physical medium. If it is not plain ethernet, the physical miniport can convert the .1q info into something else (not the VLAN tag), but then on receive path it must translate it back to original priority & VLAN values, which you receive in NET_BUFFER_LIST_INFO and pass up to ndistest. -- pa
  Message 3 of 6  
17 Mar 17 07:24
vinay kp
xxxxxx@gmail.com
Join Date: 15 Dec 2016
Posts To This List: 182
Can't get correct packet during Receive NetBuffer list function

Thanks for suggestion @Pavel A . I am setting physical medium as NdisPhysicalMediumUnspecified . ndisMiniportAdapterGeneralAttributes.MediaType = NdisMedium802_3; ndisMiniportAdapterGeneralAttributes.PhysicalMediumType = NdisPhysicalMediumUnspecified; But i analyzed NET_BUFFER_LIST_INFO in receive side of filter driver . I didn't get any values . I think that is why the test failed . mu virtual driver is dummy . So i am handling on filter driver send and receive side . I didn't understand the "out-of-band" 8021q info . Can you explain little bit .
  Message 4 of 6  
17 Mar 17 07:29
vinay kp
xxxxxx@gmail.com
Join Date: 15 Dec 2016
Posts To This List: 182
Can't get correct packet during Receive NetBuffer list function

also how to check whether it supports "out-of-band" 8021q info ?
  Message 5 of 6  
19 Mar 17 11:20
Pavel A
xxxxxx@fastmail.fm
Join Date: 21 Jul 2008
Posts To This List: 2377
Can't get correct packet during Receive NetBuffer list function

Hi Vinay, By "out of band" I mean that the priority bits are not contained in the network packet data of an NB (NBL) but passed in NET_BUFFER_LIST_INFO. As documented here: https://msdn.microsoft.com/en-us/library/windows/hardware/ff569597 <quote> Packet-priority values are received in NET_BUFFER structures from higher-layer drivers. The appropriate information is generated in the MAC headers of packets and transmitted over the network. In addition, this NIC and its driver support extracting the appropriate information from the MAC headers of packets received from the network. This information is forwarded in NET_BUFFER structures to higher-layer drivers. Note NDIS 6.0 and later ... miniport drivers must set the NDIS_MAC_OPTION_8021P_PRIORITY flag. </quote> See also the comments for handling this in the netvmini sample: https://github.com/Microsoft/Windows-driver-samples/blob/master/network/ndis/netv mini/6x/mphal.c near line 848. Regards, -- pa
  Message 6 of 6  
20 Mar 17 09:58
vinay kp
xxxxxx@gmail.com
Join Date: 15 Dec 2016
Posts To This List: 182
Can't get correct packet during Receive NetBuffer list function

This is what exactly i am doing : HLK will add the priority tags when it send packets . So i don't want add any stuffs inside NET_BUFFER_LIST . Isn't ? Now i can see priority values whenever query NET_BUFFER_LIST_INFO(Netbufferlist , Ieee8021QNetBufferListInf??o) in Send path . But when In receiving side, i just check same info whether this priority present or not in the packet using NET_BUFFER_LIST_INFO value . But i am getting zero values . Why it happens ? Because i am getting values when send NET_BUFFER_LIST and not getting any values when receive . Any suggestions ? I didn't add priority header manually inside ethernet frame . I just check only NET_BUFFER_LIST_INFO values is present or not . This is correct approach ? Any suggestions ?
Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You must login to OSR Online AND be a member of the ntdev list to be able to post.

All times are GMT -5. The time now is 01:18.


Copyright ©2015, OSR Open Systems Resources, Inc.
Based on vBulletin Copyright ©2000 - 2005, Jelsoft Enterprises Ltd.
Modified under license