_NDK_SGE structure

The NDK_SGE structure specifies the local buffers for NDK work requests.

Syntax

typedef struct _NDK_SGE {
  union {
    PVOID               VirtualAddress;
    NDK_LOGICAL_ADDRESS LogicalAddress;
  };
  ULONG  Length;
  UINT32 MemoryRegionToken;
} NDK_SGE;

Members

Length

The length, in bytes, of the buffer.

MemoryRegionToken

A memory region token. When MemoryRegionToken is set to the token returned by NdkGetPrivilegedMemoryRegionToken (NDK_FN_GET_PRIVILEGED_MEMORY_REGION_TOKEN), the NDK_SGE must contain a LogicalAddress. When MemoryRegionToken is not equal to the token returned by NdkGetPrivilegedMemoryRegionToken, the NDK_SGE structure must contain a VirtualAddress. When an NDK_SGE structure is used in a work request with the NDK_OP_FLAG_INLINE flag, MemoryRegionToken might be invalid. See the remarks section for more information about the MemoryRegionToken.

Remarks

The NDK_SGE structure specifies the local buffers for send, receive, read, and write work requests.

When the MemoryRegionToken member is set to the token returned by NdkGetPrivilegedMemoryRegionToken (NDK_FN_GET_PRIVILEGED_MEMORY_REGION_TOKEN), the NDK_SGE must contain a logical address returned by the NdkBuildLam (NDK_FN_BUILD_LAM) function with the NDK_LOGICAL_ADDRESS_MAPPING structure. Note that consecutive entries in the AdapterPageArray member of an NDK_LOGICAL_ADDRESS_MAPPING are not necessarily contiguous pages in the adapter's logical address space. Therefore, an NDK consumer might use multiple SGEs to cover all of the pages in an adapter page array.

When the token in the MemoryRegionToken member is not equal to the token that is returned by NdkGetPrivilegedMemoryRegionToken, the NDK_SGE structure must contain a virtual address that falls within the virtual address span of a previously registered memory region.

When an NDK_SGE structure is used in a work request with the NDK_OP_FLAG_INLINE flag, the token in MemoryRegionToken might be invalid, so it must be ignored by the NDK provider. When the NDK_OP_FLAG_INLINE flag is specified, the VirtualAddress member of any NDK_SGE structure that is passed to the work request function must point to a buffer that can be accessed by the NDK provider at an IRQL less than or equal to DISPATCH_LEVEL, That is, the buffer must be guaranteed to be resident in physical memory until the work request function returns. The total size of inline data that is passed to the provider in a single call must not exceed the value in the InlineDataSize parameter that was specified when the queue pair (QP) was created.

Requirements

   
Windows version None supported,Supported in NDIS 6.30 and later. None supported,Supported in NDIS 6.30 and later.
Header ndkpi.h (include Ndkpi.h)

See Also

NDKPI Object Lifetime Requirements

NDK_FN_RECEIVE

NDK_FN_WRITE

NDK_FN_READ

NDK_FN_WRITE

NDK_FN_BUILD_LAM

NDKPI Object Lifetime Requirements

NDK_LOGICAL_ADDRESS_MAPPING

NDK_FN_GET_PRIVILEGED_MEMORY_REGION_TOKEN

Send comments about this topic to Microsoft