Upravit

Sdílet prostřednictvím


OID_SWITCH_PORT_DELETE

The protocol edge of the Hyper-V extensible switch issues an object identifier (OID) set request of OID_SWITCH_PORT_DELETE to notify extensible switch extensions about the deletion of an extensible switch port.

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

Remarks

The PortId member of the NDIS_SWITCH_PORT_PARAMETERS structure specifies the extensible switch port for which the delete notification is being made.

If a network adapter is connected to the specified port, the protocol edge of the extensible switch will delete the connection before it deletes the port. In this case, the protocol edge will follow these steps before it deletes the port:

  • The protocol edge issues an OID set request of OID_SWITCH_NIC_DISCONNECT to notify the extension that the connection between a network adapter and the extensible switch port is being deleted.

  • After all pending packets for the specified extensible switch port have been canceled or completed, the protocol edge issues an OID set request of OID_SWITCH_NIC_DELETE to notify the extension that the connection between a network adapter and the extensible switch port has been deleted.

    At this point, the protocol edge can start to delete the port.

The protocol edge of the extensible switch follows these steps when it deletes an extensible switch port:

  1. The protocol edge of the extensible switch issues an OID set request of OID_SWITCH_PORT_TEARDOWN. This OID request notifies underlying extensible switch extensions about the start of the deletion process for an extensible switch port.

  2. The protocol edge issues an OID set request of OID_SWITCH_PORT_DELETE after all OID requests to the extensible switch port have completed.

    Note  If the extension had previously called ReferenceSwitchPort to increment the port's reference counter, it must call DereferenceSwitchPort before the protocol edge issues the OID_SWITCH_NIC_DELETE request.

The extension must follow these guidelines for handling OID set requests of OID_SWITCH_PORT_DELETE:

  • The extension must not modify the NDIS_SWITCH_PORT_PARAMETERS structure that is associated with the OID request.

  • The extension must always forward this OID set request to underlying extensions. The extension must not fail the request.

  • After the OID_SWITCH_PORT_DELETE request is completed with NDIS_STATUS_SUCCESS, the extension will not receive any packets or OID requests for the deleted port. The extension cannot forward packets to the deleted port. The extension also cannot issue OID requests nor call the ReferenceSwitchPort function for the deleted port.

Note  Extensible switch extensions must not issue OID set requests of OID_SWITCH_PORT_DELETE.

For more information about the states of extensible switch ports and network adapter connections, see Hyper-V Extensible Switch Port and Network Adapter States.

Return Status Codes

The underlying miniport edge of the extensible switch completes the OID set request of OID_SWITCH_PORT_DELETE and returns the following status code.

Status Code Description

NDIS_STATUS_SUCCESS

The OID request completed successfully.

Requirements

Version

Supported in NDIS 6.30 and later.

Header

Ntddndis.h (include Ndis.h)

See also


DereferenceSwitchPort

NDIS_OID_REQUEST

NDIS_SWITCH_PORT_PARAMETERS

NdisFOidRequest

OID_SWITCH_NIC_DELETE

OID_SWITCH_PORT_ARRAY

ReferenceSwitchPort