// ntddndis.h
typedef struct _NDIS_QOS_SQ_PARAMETERS {
NDIS_OBJECT_HEADER Header;
ULONG Flags;
NDIS_QOS_SQ_ID SqId;
NDIS_QOS_SQ_TYPE SqType;
BOOLEAN TcEnabledTable[NDIS_QOS_MAXIMUM_TRAFFIC_CLASSES];
ULONG TcTransmitBandwidthCapTable[NDIS_QOS_MAXIMUM_TRAFFIC_CLASSES];
ULONG TcTransmitBandwidthReservationTable[NDIS_QOS_MAXIMUM_TRAFFIC_CLASSES];
ULONG TcReceiveBandwidthCapTable[NDIS_QOS_MAXIMUM_TRAFFIC_CLASSES];
ULONG CrossTcTransmitBandwidthCap;
ULONG MaxNumSqInputs;
} NDIS_QOS_SQ_PARAMETERS, *PNDIS_QOS_SQ_PARAMETERS;
View the official Windows Driver Kit DDI referenceNo description available.
The NDIS_QOS_SQ_PARAMETERS structure contains the parameters of an NDIS Quality of Service (QoS) Scheduler Queue (SQ).
HeaderThe type, revision, and size of the NDIS_QOS_SQ_PARAMETERS structure. This member is formatted as an NDIS_OBJECT_HEADER structure.
The miniport driver must set the Type member of Header to NDIS_OBJECT_TYPE_DEFAULT, the Revision member to NDIS_QOS_SQ_PARAMETERS_REVISION_2, and the Size member to NDIS_SIZEOF_QOS_SQ_PARAMETERS_REVISION_2.
FlagsA ULONG value that contains a bitwise OR of flags. These flags specify the miscellaneous capabilities and attributes of the Hardware QoS Offload features that are enabled on the SQ. The following flags are defined:
If this flag is set, transmit bandwidth caps are enabled on this SQ.
If this flag is set, transmit bandwidth reservations are enabled on this SQ.
If this flag is set, receive bandwidth caps are enabled on this SQ.
SqIdAn NDIS_QOS_SQ_ID that contains the SQ ID of this SQ. NDIS assigns this ID.
SqTypeAn NDIS_QOS_SQ_TYPE that contains the type of this SQ. This can be NdisQSQosSqSQTypeStandard from the enum definition of NDIS_QOS_SQ_TYPE.
TcEnabledTableAn array of BOOLEAN values that specify whether each traffic class (from 0 to NDIS_QOS_MAXIMUM_TRAFFIC_CLASSES) is enabled for scheduling on this SQ.
Any traffic class (TC) for which this field is TRUE should be read and validated in the tables below, and is also rate limited by CrossTcTransmitBandwidthCap.
Any TC for which this field is FALSE does not participate in QoS rate limiting from CrossTcTransmitBandwidthCap or the per-TC tables below.
TcTransmitBandwidthCapTableAn array of ULONG elements that specify transmit bandwidth caps for each TC, in Mbps. Elements are only valid if the NDIS_QOS_SQ_TRANSMIT_CAP_ENABLED flag is set and their corresponding element in TcEnabledTable is TRUE. An element with a value of 0 has no cap.
The NIC should queue any transmit packets on this SQ for a given TC if they exceed the rate specified in this table.
TcTransmitBandwidthReservationTableAn array of ULONG elements that specify transmit bandwidth reservations for each TC, in relative values from 0 – ULONG_MAX. Elements are only valid if the NDIS_QOS_SQ_TRANSMIT_RESERVATION_ENABLED flag is set and their corresponding element in TcEnabledTable is TRUE. An element with a value of 0 means that transmit packets on this SQ/TC share the default SQ’s reservation for that TC.
The NIC should queue any transmit packets on this SQ for a given TC if other SQs require bandwidth to meet their reservation for this TC.
TcReceiveBandwidthCapTableAn array of ULONG elements that specify receive bandwidth caps for each TC, in Mbps. Elements are only valid if the NDIS_QOS_SQ_RECEIVE_CAP_ENABLED flag is set and their corresponding element in TcEnabledTable is TRUE. An element with a value of 0 has no cap.
This is an optional feature for enabling receive bandwidth capping. NICs that advertise receive cap support should drop any receive packet after a given TC on this SQ has exceeded the rate specified in this array (based on the NIC’s scheduling implementation).
CrossTcTransmitBandwidthCapA ULONG value that specifies the transmit bandwidth cap for traffic across TCs whose corresponding element in TcEnabledTable is TRUE, if the NDIS_QOS_SQ_TRANSMIT_CAP_ENABLED flag is set.
MaxNumSqInputsA ULONG value that offers a “hint” to the miniport on the likely number of vPorts that the OS will associate with the SQ. This value cannot be modified after SQ creation.
The miniport may use this hint to manage its resources better. The miniport will provide best-effort service to satisfy the request, but may fail due to insufficient resources at SQ creation time or vPort association time.
The miniport must return an error if this value exceeds the MaxNumSQInputs value specified by the miniport in NDIS_QOS_OFFLOAD_CAPABILITIES.
The NDIS_QOS_SQ_PARAMETERS structure is returned in the OID query request OID_QOS_OFFLOAD_ENUM_SQS, which enumerates SQs created on a NIC switch.
NDIS_QOS_SQ_PARAMETERS is also returned in the OID method request OID_QOS_OFFLOAD_CREATE_SQ, which creates a new SQ on the miniport adapter.