Hello All,
I am looking for a way to get the Physical address of each NDIS BUFFER
attached to a packet when it comes down to my miniport driver. I can
call NDIS_PER_PACKET_INFO_FROM_PACKET and get the SGL which will provide
me a list of {address, length} pairs for a series of Physically
contiguous data buffers, but not their virtual address (I might have to
do some copying in the driver). On the other hand, I can traverse the
packet and get the VA and length of each NDIS buffer but not its
physical address. Do the addresses provided by the SGL correspond to the
VA obtained by traversing the packet (i.e. are the number of elements in
the SGL same as the number of buffers attached to a NDIS packet?)
Put differently,
- Is there a way to obtain both the physical address (so my NIC can DMA
data) and the virtual address of each buffer.
- Is there a way to tell if the range of virtual addresses pointed to
by an NDIS buffer (starting, starting + length) span two different page
boundaries (assuming that the data is less than a page size)?
Thanks
ravi
Hi Ravi,
For question (2) you can use NdisQueryBufferOffset.
Regards
Beyers
On 8/16/05, Murty, Ravi wrote:
>
>
> Hello All,
>
> I am looking for a way to get the Physical address of each NDIS BUFFER
> attached to a packet when it comes down to my miniport driver. I can call
> NDIS_PER_PACKET_INFO_FROM_PACKET and get the SGL which will
> provide me a list of {address, length} pairs for a series of Physically
> contiguous data buffers, but not their virtual address (I might have to do
> some copying in the driver). On the other hand, I can traverse the packet
> and get the VA and length of each NDIS buffer but not its physical address.
> Do the addresses provided by the SGL correspond to the VA obtained by
> traversing the packet (i.e. are the number of elements in the SGL same as
> the number of buffers attached to a NDIS packet?)
>
> Put differently,
>
> 1) Is there a way to obtain both the physical address (so my NIC can DMA
> data) and the virtual address of each buffer.
>
> 2) Is there a way to tell if the range of virtual addresses pointed to by an
> NDIS buffer (starting, starting + length) span two different page boundaries
> (assuming that the data is less than a page size)?
>
> Thanks
>
> ravi
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
> To unsubscribe send a blank email to
> xxxxx@lists.osr.com
NDIS buffer addresses. Yes, the physical addressess correspond to these virtual addresses, and are also passed thru bus address translation facility.
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: Murty, Ravi
To: Windows System Software Devs Interest List
Sent: Tuesday, August 16, 2005 3:30 AM
Subject: [ntdev] NDIS buffer addresses.
Hello All,
I am looking for a way to get the Physical address of each NDIS BUFFER attached to a packet when it comes down to my miniport driver. I can call NDIS_PER_PACKET_INFO_FROM_PACKET and get the SGL which will provide me a list of {address, length} pairs for a series of Physically contiguous data buffers, but not their virtual address (I might have to do some copying in the driver). On the other hand, I can traverse the packet and get the VA and length of each NDIS buffer but not its physical address. Do the addresses provided by the SGL correspond to the VA obtained by traversing the packet (i.e. are the number of elements in the SGL same as the number of buffers attached to a NDIS packet?)
Put differently,
-
Is there a way to obtain both the physical address (so my NIC can DMA data) and the virtual address of each buffer.
-
Is there a way to tell if the range of virtual addresses pointed to by an NDIS buffer (starting, starting + length) span two different page boundaries (assuming that the data is less than a page size)?
Thanks
ravi
Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com