NET_BUFFER_LISTS and completion status...

To finalize completion of a NET_BUFFER_LIST, you need to set the status
for each NET_BUFFER in the list then call
NdisMSendNetBufferListsComplete().

What if the NBL contains 5 NBs, and 3 of these are transferred
successfully before an error is detected?

What is the correct thing to do wrt the NBL completion status?

Thanks,
-PWM

I would set NBL to NDIS_STATUS_SUCCESS if and only if ALL NBs were transmitted successfully.

Failing handful of TX packets occasionally won’t kill except causing some undesired effects or failing some certification tests which expect that the TX shouldn’t have failed. Ethernet is not reliable service. Network transport layer should take care of it by means of ack/nack/retransmissions. However, unexpected frequent TX failures should be investigated and avoided especially in high performance TCP applications or test scenarios. They can also cause some subtle network problems which is difficult to realize. They are one of many performance murders.

Calvin Guan
Broadcom Corp.
Connecting Everything(r)

Adding to Mr. Guan’s reply:

IIRC when a Send presents as a NBL with multiple NBs, the individual NBs are
‘related’. The example I recall was that the TCPIP stack might send
multiple MSS sized frames in one NBL up to the size of the open window.
Another example I recall was a fragment group.

The safest thing to ‘return’ in the case of succeeding to send some but not
all NBs in an NBL is to return the failure status. The protocol (or
application) has to deal with it regardless of how many (or few) of the NBs
got sent.

Out of curiosity, just how frequently do you observe a NBL with more than
one NB in your driver?

Good Luck,
Dave Cattley

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Peter W. Morreale
Sent: Monday, January 04, 2010 2:34 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] NET_BUFFER_LISTS and completion status…

To finalize completion of a NET_BUFFER_LIST, you need to set the status
for each NET_BUFFER in the list then call
NdisMSendNetBufferListsComplete().

What if the NBL contains 5 NBs, and 3 of these are transferred
successfully before an error is detected?

What is the correct thing to do wrt the NBL completion status?

Thanks,
-PWM


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

On Mon, 2010-01-04 at 16:22 -0500, David R. Cattley wrote:

Out of curiosity, just how frequently do you observe a NBL with more than
one NB in your driver?

I haven’t observed any as of yet. :wink:

Still under construction.

The point is, the NBL contains a *list* of NBs, and consequently the
driver has to know how to deal with more than one appropriately in the
event of some abnormal failure case.

Thanks,
-PWM