OID_NIC_SWITCH_DELETE_SWITCH

NDIS issues an object identifier (OID) set request of OID_NIC_SWITCH_DELETE_SWITCH to delete a NIC switch from a network adapter.

NDIS issues this OID set request to the miniport driver of the network adapter's PCI Express (PCIe) Physical Function (PF). This OID set request is required for PF miniport drivers that support the single root I/O virtualization (SR-IOV) interface.

Note  Overlying drivers, such as protocol or filter drivers, cannot issue this OID method request to the PF miniport driver.

The InformationBuffer member of the NDIS_OID_REQUEST structure contains a pointer to an NDIS_NIC_SWITCH_DELETE_SWITCH_PARAMETERS structure.

Remarks

An OID set request of OID_NIC_SWITCH_DELETE_SWITCH deletes a NIC switch that was previously created through an OID method request of OID_NIC_SWITCH_CREATE_SWITCH.

When it receives the OID method request of OID_NIC_SWITCH_DELETE_SWITCH, the PF miniport driver must do the following:

  1. If the PF miniport driver supports static creation and configuration of NIC switches, it must free the software resources associated with the specified NIC switch. However, the driver can only free the hardware resources for the NIC switch when MiniportHaltEx is called.

    For more information about static NIC switch creation, see Static Creation of a NIC Switch.

  2. If the PF miniport driver supports the dynamic creation and configuration of NIC switches, it must free the hardware and software resources associated with the specified NIC switch.

    For more information about dynamic NIC switch creation, see Dynamic Creation of a NIC Switch.

  3. If the PF miniport driver supports the dynamic creation and all the NIC switches have been deleted, the driver must disable virtualization on the adapter by calling NdisMEnableVirtualization. To disable virtualization, the network adapter must set the EnableVirtualization parameter to FALSE and the NumVFs parameter to zero.

    NdisMEnableVirtualization clears the NumVFs member and the VF Enable bit in the SR-IOV Extended Capability structure in the PCI configuration space of the network adapter's PF.

    Note  If the PF miniport driver supports static creation and configuration of NIC switches, it must only call NdisMEnableVirtualization when MiniportHaltEx is called.

For more information, see Deleting a NIC Switch.

Return Status Codes

The miniport driver's MiniportOidRequest function returns one of the following values for this request:

Term Description

NDIS_STATUS_SUCCESS

The miniport driver completed the request successfully.

NDIS_STATUS_PENDING

The miniport driver will complete the request asynchronously. After the miniport driver has completed all processing, it must succeed the request by calling the NdisMOidRequestComplete function, passing NDIS_STATUS_SUCCESS for the Status parameter.

NDIS_STATUS_NOT_ACCEPTED

The miniport driver is resetting.

NDIS_STATUS_REQUEST_ABORTED

The miniport driver stopped processing the request. For example, NDIS called the MiniportResetEx function.

NDIS returns one of the following status codes for this request:

Term Description

NDIS_STATUS_SUCCESS

The OID request completed successfully.

NDIS_STATUS_NOT_SUPPORTED

The PF miniport driver either does not support the SR-IOV interface or is not enabled to use the interface.

NDIS_STATUS_FILE_NOT_FOUND

One or more of the members of the NDIS_NIC_SWITCH_DELETE_SWITCH_PARAMETERS structure have invalid values.

NDIS_STATUS_INVALID_LENGTH

The information buffer is too small. NDIS sets the DATA.SET_INFORMATION.BytesNeeded member in the NDIS_OID_REQUEST structure to the minimum buffer size that is required.

Requirements

Version

Supported in NDIS 6.30 and later.

Header

Ntddndis.h (include Ndis.h)

See also


MiniportHaltEx

NDIS_OID_REQUEST

NDIS_NIC_SWITCH_DELETE_SWITCH_PARAMETERS

OID_NIC_SWITCH_ALLOCATE_VF

OID_NIC_SWITCH_CREATE_SWITCH

OID_NIC_SWITCH_DELETE_VPORT

OID_NIC_SWITCH_FREE_VF