Bewerken

Delen via


OID_SWITCH_PORT_CREATE

The protocol edge of the Hyper-V extensible switch issues an object identifier (OID) set request of OID_SWITCH_PORT_CREATE to notify extensible switch extensions about the creation 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 port for which the creation notification is being made.

The extensible switch extension must follow these guidelines for handling OID set requests of OID_SWITCH_PORT_CREATE:

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

  • The extension can veto the creation notification by returning NDIS_STATUS_DATA_NOT_ACCEPTED for the OID request. For example, if an extension cannot allocate resources to enforce its configured policies on the port, the driver should veto the creation notification.

    If the extension returns other NDIS_STATUS_Xxx error status codes, the creation notification is also vetoed. However, returning status codes for transitory scenarios, such as returning NDIS_STATUS_RESOURCES, could result in a retry of the creation notification.

    If the extension does not veto the OID request, it should monitor the status when the request is completed. The extension should do this to determine whether the OID request was vetoed by underlying extensions in the extensible switch control path or by the extensible switch interface.

    For more information on port policies, see Managing Hyper-V Extensible Switch Policies.

  • If the extension calls NdisFOidRequest to forward this OID set request, the extension should monitor the completion status of this OID request. The extension does this to detect whether underlying extensions in the extensible switch driver stack have vetoed the port creation notification.

  • After the OID request is forwarded and completes successfully, the extension can issue OIDs requests for the port, such as OID_SWITCH_PORT_PROPERTY_ENUM, until an OID request of OID_SWITCH_PORT_TEARDOWN is issued. This OID request notifies the extension that the port will begin the deletion process from the extensible switch.

  • Extensions cannot forward packets to the specified port in the NDIS_SWITCH_PORT_PARAMETERS structure until an OID set request of OID_SWITCH_NIC_CONNECT is issued and is completed successfully.

Note  Extensions must not issue OID set requests of OID_SWITCH_PORT_CREATE.

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

If the extension completes the OID set request of OID_SWITCH_PORT_CREATE, it returns one of the following status codes.

Status Code Description

NDIS_STATUS_DATA_NOT_ACCEPTED

The extension vetoed the creation notification.

NDIS_STATUS_RESOURCES

The extension vetoed the creation notification due to a low resource condition.

NDIS_STATUS_Xxx

The extension vetoed the creation notification for other reasons.

Note  If the extension completes the OID set request, it must not return NDIS_STATUS_SUCCESS.

If the extension does not complete the OID set request of OID_SWITCH_PORT_CREATE, the request is completed by the underlying miniport edge of the extensible switch. The underlying miniport edge returns the following status code for this OID set request.

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


NDIS_OID_REQUEST

NDIS_SWITCH_PORT_PARAMETERS

NdisFOidRequest

OID_SWITCH_NIC_CONNECT

OID_SWITCH_PORT_ARRAY

OID_SWITCH_PORT_PROPERTY_ENUM