Развернуть Свернуть

NdisMSendResourcesAvailable function

Note   NDIS 5. x has been deprecated and is superseded by NDIS 6. x. For new NDIS driver development, see Network Drivers Starting with Windows Vista. For information about porting NDIS 5. x drivers to NDIS 6. x, see Porting NDIS 5.x Drivers to NDIS 6.0.

NdisMSendResourcesAvailable notifies NDIS that a miniport driver has sufficient internal resources to accept another send request, even though one or more outstanding send operations might be pending completion within the miniport driver.

Syntax


VOID NdisMSendResourcesAvailable(
  _In_  NDIS_HANDLE MiniportAdapterHandle
);

Parameters

MiniportAdapterHandle [in]

Specifies the handle originally input to MiniportInitialize.

Return value

None

Remarks

''If a serialized miniport driver or its NIC has insufficient resources to input a packet submitted to its MiniportSendPackets or MiniportSend function, the driver returns NDIS_STATUS_RESOURCES to NDIS as follows:

  • Its MiniportSendPackets function sets the Status member in the out-of-band data block for a packet to NDIS_STATUS_RESOURCES with NDIS_SET_PACKET_STATUS.

  • Its MiniportSend function returns NDIS_STATUS_RESOURCES.

In the case of MiniportSendPackets, returning NDIS_STATUS_RESOURCES causes NDIS to requeue the associated packet and all the remaining packets referenced by the packet descriptors in the packet array input to MiniportSendPackets In the case of MiniportSend, this causes NDIS to requeue the associated packet.

After a miniport driver's MiniportSend(Packets) function has returned NDIS_STATUS_RESOURCES, the driver can call NdisMSendResourcesAvailable if the driver is capable of accepting another send request immediately. Such a call allows the driver of a high-capacity NIC to optimize transmissions over the network by sending more data at a time.

A miniport driver should call NdisMSendResourcesAvailable only to cancel an NDIS_STATUS_RESOURCES indication that the driver previously returned from its MiniportSend(Packets) function. A driver can call NdisMSendResourcesAvailable outside this context without harm, but this wastes CPU cycles.

Note that, when a miniport driver calls NdisMSendComplete, NDIS assumes that a previously indicated resource problem no longer exists and that the miniport driver is therefore ready to process another send request. In this case, a miniport driver does not have to call NdisMSendResourcesAvailable to indicate that a previously indicated resource problem no longer exists.

A WAN miniport driver cannot call NdisMSendResourcesAvailable.

A miniport driver must release any spin lock that it is holding before calling NdisMSendResourcesAvailable.

Requirements

Version

Not supported for NDIS 6.0 drivers in Windows Vista. Supported for NDIS 5.1 drivers in Windows Vista and Windows XP.

Header

Ndis.h (include Ndis.h)

IRQL

DISPATCH_LEVEL

See also

MiniportSend
MiniportSendPackets
NDIS_PACKET
NDIS_PACKET_OOB_DATA
NdisSend
NdisSendPackets
NDIS_SET_PACKET_STATUS

 

 

Send comments about this topic to Microsoft

Показ:
© 2014 Microsoft