In order for a Fibre Channel PF driver to add support for SR-IOV, it must call ddi_cb_register() and include the DDI_CB_FLAG_SRIOV flag. See section Driver Callbacks for more information.
A Fibre Channel PF driver that has registered for SR-IOV callbacks will receive callbacks with DDI_CB_PCIV_CLASS_CONFIG as the action parameter. The callback includes the cbarg parameter, a pointer to a fciov_conf_t structure:
typedef struct fciov_conf { fciov_config_cmd_t fci_cmd; /* configuration op to be performed */ uint16_t fci_vf_id; /* Index of the VF to be configured */ fciov_cfg_flags fci_flags; /* Flags, indicate which info is valid */ uint8_t fci_node_wwn[8];/* node WWN for the VF */ uint8_t fci_port_wwn[8];/* port WWN for the VF */ uint16_t fci_bandwidth; /* percentile bandwidth for the VF */ } fciov_conf_t;
Indicates what operation to perform for the specified VF. Valid values are defined as follows:
typedef enum { FCIOV_VF_CONFIG = 0x1, /* Configure a FC VF */ FCIOV_VF_UPDCONFIG = 0x2,/* Update configuration of FC VF */ FCIOV_VF_UNCONFIG = 0x4 /* Unconfigure a FC VF*/ }fciov_config_cmd_t;
An index number of a VF for the PF that is receiving the callback. Valid values for this field are 0 to N-1, where N is the number of virtual functions enabled in the receiving PF.
A bitmask that indicates which of the included data fields are valid. Supported values are defined as follows:
typedef enum { FCIOV_NODE_WWN = 0x1, /* node WWN info is valid */ FCIOV_PORT_WWN = 0x2, /* port WWN info is valid */ FCIOV_BANDWIDTH = 0x4 /* bandwidth info is valid */ }fciov_cfg_flags;
The node world wide name (WWN) of the specified VF.
The port world wide name (WWN) of the specified VF.
Indicates the bandwidth in percentile that needs to be allocated to the virtual function. For more information, see Bandwidth Configuration for Fibre Channel Virtual Functions.