NDIS_BUFFER_LINKAGE + NdisChainBufferAtBack

The docs for NDIS_BUFFER_LINKAGE say “This macro allows a driver to
queue allocated buffer descriptors without having to supply its own
buffer descriptor linkage” and the macro is just (buffer)->Next.

As I receive data from Xen I build an NDIS_BUFFER out of it, and if the
packet has multiple buffers I use NDIS_BUFFER_LINKAGE to link them
together.

Does NdisChainBufferAtBack clear the ->Next for me or am I supposed to
do it myself? I’m not clearing it and it isn’t working so I’m suspecting
the latter option but it doesn’t appear to be documented anywhere.

Thanks

James

I thought NdisChainBufferAtBack() was a macro or FORCEINLINE in NDIS.H

In any event, no, I don’t believe it clears it for you. In fact, I think it
allows you to chain a ‘chain’ at the back. In other words, you better have
Next->NULL if you want NDIS to treat it as a single buffer.

-Dave

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of James Harper
Sent: Thursday, January 29, 2009 7:32 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] NDIS_BUFFER_LINKAGE + NdisChainBufferAtBack

The docs for NDIS_BUFFER_LINKAGE say “This macro allows a driver to
queue allocated buffer descriptors without having to supply its own
buffer descriptor linkage” and the macro is just (buffer)->Next.

As I receive data from Xen I build an NDIS_BUFFER out of it, and if the
packet has multiple buffers I use NDIS_BUFFER_LINKAGE to link them
together.

Does NdisChainBufferAtBack clear the ->Next for me or am I supposed to
do it myself? I’m not clearing it and it isn’t working so I’m suspecting
the latter option but it doesn’t appear to be documented anywhere.

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

>

I thought NdisChainBufferAtBack() was a macro or FORCEINLINE in NDIS.H

D’oh. It is too. I should have checked before posting. It definitely
doesn’t clear the Next link.

Thanks

James