Re: How is possible that NDIS_PACKET->Head->MappedSystemVa is page



So are you 100% sure that in health W2K/WXP/W2K3 OS-es
Packet->Head->MappedSystemVa, never can be paged ?

Surely. This is a return value from MmGetSystemAddressForMdlSafe (well, maybe
as sum of this and ->ByteOffset is the return value, forgotten the exact
picture - possible ->MappedSystemVa is page-aligned down). This cannot be
paged.

For MDLs built by MmBuildMdlForNonPagedPool, MappedSystemVa is the same as
BaseVa, and a flag is set in the MDL to force MmGetSystemAddressForMdlSafe to
be a no-op.

NdisAllocateBuffer == IoAllocateMdl + MmBuildMdlForNonPagedPool, so, something
is really strange for you.

Remember the "first buffer size" requirement for NdisMIndicateReceivePacket
mentioned by Thomas. It must be >= MAC header size + the lookahead size
(requested by the uppers using OID).

This is done for NDIS to allow to deliver this packet to old-style PtReceive
without doing data copies, and to allow the protocols to always treat their
headers as contiguous - TCP/IP relies on this.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@xxxxxxxxxxxxxxxx
http://www.storagecraft.com

.


Loading