Muokkaa

Jaa


OID_SWITCH_NIC_CREATE

The protocol edge of the Hyper-V extensible switch issues an object identifier (OID) set request of OID_SWITCH_NIC_CREATE to notify underlying extensible switch extensions that a new connection is being established between an extensible switch port and an external or virtual network adapter. After the connection is fully established, the protocol edge of the extensible switch issues an OID set request of OID_SWITCH_NIC_CONNECT.

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

Remarks

The PortId member of the NDIS_SWITCH_NIC_PARAMETERS structure specifies the extensible switch port for which the creation notification is being made. The extensible switch extension can obtain the parameter information for this and other ports on the extensible switch by issuing OID query requests of OID_SWITCH_PORT_ARRAY.

The Index member of the NDIS_SWITCH_NIC_PARAMETERS structure specifies the index of a network adapter for which the creation notification is being made. The network adapter with the specified Index value is connected to the extensible switch port specified by the PortId member. For more information on these index values, see Network Adapter Index Values.

When it receives the OID set request of OID_SWITCH_NIC_CREATE, the extension must follow these guidelines:

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

  • The OID_SWITCH_NIC_CREATE request only notifies the extension that a new extensible switch connection is being brought up and that packet traffic may soon begin to occur over the specified port. However, the extension cannot use the port until the protocol edge of the extensible switch issues an OID set request of OID_SWITCH_NIC_CONNECT. Until that OID is issued, the extension must not do the following:

    • Generate any packet traffic to the network adapter connection on the extensible switch port for which the OID_SWITCH_NIC_CREATE OID request was issued.

    • Forward or originate OID requests of OID_SWITCH_NIC_REQUEST to an underlying network adapter for which the OID_SWITCH_NIC_CREATE OID request was issued.

    • Forward or originate NDIS status indications of NDIS_STATUS_SWITCH_NIC_STATUS from an underlying network adapter for which the OID_SWITCH_NIC_CREATE OID request was issued.

    • Call ReferenceSwitchNic to increment the extensible switch reference counter for the specified network adapter connection on the extensible switch port.

    Note  The extension may intercept send or receive packets for the specified port between the OID requests of OID_SWITCH_NIC_CREATE and OID_SWITCH_NIC_CONNECT. In this case, the extension should forward the send or receive packet requests instead of canceling them.

  • The extension can veto the creation notification by returning NDIS_STATUS_DATA_NOT_ACCEPTED for the OID request. For example, if an extension cannot satisfy its configured policies on the specified port, the extension should veto the creation notification.

    If the extension returns other NDIS_STATUS_Xxx 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.

    Note  The extension can only veto the OID request if the Index member of the NDIS_SWITCH_NIC_PARAMETERS structure specifies a network adapter index value of zero.

  • If the extension does not veto the creation notification, it must call NdisFOidRequest to forward this OID request to underlying extensions in the extensible switch driver stack.

    Note  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 creation notification.

  • If the extension calls NdisFOidRequest to forward this OID request, the extension will not immediately receive any packet traffic to or from the extensible switch port. In addition, the extension cannot immediately inject send or receive traffic for the extensible switch port.

  • The extension can only forward packet traffic to the extensible switch port after the protocol edge of the extensible switch issues an OID set request of OID_SWITCH_NIC_CONNECT.

    Note  In some situations, packet traffic may be forwarded by the extensible switch to the port before an OID set request of OID_SWITCH_NIC_CONNECT is issued.

  • The extensible switch external network adapter can bind to one or more underlying physical adapters. For every physical network adapter that is bound to the external network adapter, the protocol edge of the extensible switch issues a separate OID set request of OID_SWITCH_NIC_CREATE. Each OID set request specifies a different network adapter connection index value. For more information on these index values, see Network Adapter Index Values.

    The extension must maintain the connection state for each underlying physical adapter. For more information about the different configurations in which physical network adapters can be bound to the external network adapter, see Types of Physical Network Adapter Configurations.

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

Note  The extension must not issue its own OID set requests of OID_SWITCH_NIC_CREATE.

Return Status Codes

If the extension completes the OID set request of OID_SWITCH_NIC_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_NIC_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_NIC_PARAMETERS

NdisFOidRequest

OID_SWITCH_NIC_CONNECT

OID_SWITCH_PORT_ARRAY

ReferenceSwitchPort