indicating an NBL with multiple NB's

Is it acceptable for a miniport driver to indicate a NET_BUFFER_LIST
with multiple NET_BUFFER’s attached?

I receive a ‘large’ (<=64KB) packet from my inter-VM network interface
and need to split it, at least into half (see Paul Durrant’s
explananation of why I was getting bad performance in thread “rx
performance problem with ndis driver” for why) and it is more efficient
for me to create multiple NB’s under one NBL than to create multiple
NBL’s. From the bits and pieces of information I have read this should
be okay as all the NB’s are part of the same TCP connection, although if
my miniport driver was the only one in the world that did it then I
could expect bugs in other drivers mine might interact with so maybe
it’s a bad idea? If WHQL threw such packets at filter drivers then I
might be okay though.

When I indicate multiple NB’s under the one NBL I’m getting a crash at
the moment (0x50 or 0x8e, in netio.sys, which I haven’t really debugged
yet other than analyse -v and it seems to be in the return packet path
but not in my driver) so I don’t know if I’m looking for a bug in my
driver or if I’m wasting my time because I shouldn’t have multiple NB’s
under one NBL…

Can anyone here clarify this for me?

Thanks

James

And as soon as I post the message to ntdev I find this in “Send and
Receive Operations”
(http://msdn.microsoft.com/en-us/library/ff570763(v=vs.85).aspx)

"
In the receive path, miniport drivers can use a list of NET_BUFFER_LIST
structures to indicate receives. Each NET_BUFFER_LIST indicated by a
miniport driver contains one NET_BUFFER structure. However, Native
802.11 drivers can have more than one NET_BUFFER structure.
"

So maybe ndis finishes with one NET_BUFFER, returns it to me, I free the
NET_BUFFER_LIST and all associated NET_BUFFER’s, and then ndis goes on
to the next NET_BUFFER in the list and falls of the end of the world as
I’ve already free’d that memory.

In any case if the docs say one NB per NBL then one NB per NBL it is.

James

Is it acceptable for a miniport driver to indicate a NET_BUFFER_LIST
with multiple NET_BUFFER’s attached?

I receive a ‘large’ (<=64KB) packet from my inter-VM network interface
and need to split it, at least into half (see Paul Durrant’s
explananation of why I was getting bad performance in thread “rx
performance problem with ndis driver” for why) and it is more
efficient
for me to create multiple NB’s under one NBL than to create multiple
NBL’s. From the bits and pieces of information I have read this should
be okay as all the NB’s are part of the same TCP connection, although
if
my miniport driver was the only one in the world that did it then I
could expect bugs in other drivers mine might interact with so maybe
it’s a bad idea? If WHQL threw such packets at filter drivers then I
might be okay though.

When I indicate multiple NB’s under the one NBL I’m getting a crash at
the moment (0x50 or 0x8e, in netio.sys, which I haven’t really
debugged
yet other than analyse -v and it seems to be in the return packet path
but not in my driver) so I don’t know if I’m looking for a bug in my
driver or if I’m wasting my time because I shouldn’t have multiple
NB’s
under one NBL…

Can anyone here clarify this for me?

Thanks

James


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer