The protocol edge of the Hyper-V extensible switch issues an object identifier (OID) set request of OID_SWITCH_PORT_TEARDOWN to notify underlying extensible switch extensions that an extensible switch port will begin the deletion process. This process is started when the protocol driver issues an OID set request of OID_SWITCH_PORT_DELETE.
The PortId member of the NDIS_SWITCH_PORT_PARAMETERS structure specifies the extensible switch port for which the connect notification is being made. The extensible switch extension must update any cached information about the port that it obtained in the following ways:
By issuing OID query requests of OID_SWITCH_PORT_ARRAY. The extension issues this OID on FilterAttach only when OID_SWITCH_PARAMETERS returns an NDIS_SWITCH_PARAMETERS structure with IsActive set to TRUE. If IsActive is FALSE, the extension issues the OID when the NetEventSwitchActivate NET_PNP_EVENT is issued by the extension miniport.
The protocol edge of the extensible switch issues an OID set request of OID_SWITCH_PORT_TEARDOWN to notify the extension that a port is in the process of being deleted from the extensible switch. Before this OID request is issued, the protocol edge of the extensible switch had previously issued the following OIDs if the port had an active network adapter connection:
OID_SWITCH_NIC_DELETE, which notified underlying extensions that the network connection between the network adapter and extensible switch port has been deleted.
The protocol edge issues this OID set request after all pending packets for the specified extensible switch port have been canceled or completed.
After the extension completes this OID set request and the reference counter for the extensible switch port is zero, the protocol edge of the extensible switch issues an OID set request of OID_SWITCH_PORT_DELETE. This OID request deletes the port from the extensible switch.
The extension must follow these guidelines for handling OID set requests of OID_SWITCH_PORT_TEARDOWN:
The extension must always forward this OID set request to underlying extensions. The extension must not fail the request.
Note The extension must not modify the NDIS_SWITCH_PORT_PARAMETERS structure that is associated with the OID request.
After the extension forwards this OID request, it cannot forward packets to the deleted port. The extension also cannot issue OID requests nor call the ReferenceSwitchPort function for the deleted port.
Note The extension must not issue OID set requests of OID_SWITCH_PORT_TEARDOWN.
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_TEARDOWN and returns the following status code.
The OID request completed successfully.
Supported in NDIS 6.30 and later.
|Ntddndis.h (include Ndis.h)|