IB/mlx5: Implement callbacks for manipulating VFs
Implement the IB defined callbacks used to manipulate the policy for the link state, set GUIDs or get statistics information. This functionality is added into a new file that will be used to add any SRIOV related functionality to the mlx5 IB layer. The following callbacks have been added: mlx5_ib_get_vf_config mlx5_ib_set_vf_link_state mlx5_ib_get_vf_stats mlx5_ib_set_vf_guid In addition, publish whether this device is based on a virtual function. In mlx5 supported devices, virtual functions are implemented as vHCAs. vHCAs have their own QP number space so it is possible that two vHCAs will use a QP with the same number at the same time. Signed-off-by: Eli Cohen <eli@mellanox.com> Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
@@ -613,7 +613,10 @@ struct mlx5_pas {
|
||||
};
|
||||
|
||||
enum port_state_policy {
|
||||
MLX5_AAA_000
|
||||
MLX5_POLICY_DOWN = 0,
|
||||
MLX5_POLICY_UP = 1,
|
||||
MLX5_POLICY_FOLLOW = 2,
|
||||
MLX5_POLICY_INVALID = 0xffffffff
|
||||
};
|
||||
|
||||
enum phy_port_state {
|
||||
|
@@ -3696,6 +3696,12 @@ struct mlx5_ifc_query_hca_vport_pkey_in_bits {
|
||||
u8 pkey_index[0x10];
|
||||
};
|
||||
|
||||
enum {
|
||||
MLX5_HCA_VPORT_SEL_PORT_GUID = 1 << 0,
|
||||
MLX5_HCA_VPORT_SEL_NODE_GUID = 1 << 1,
|
||||
MLX5_HCA_VPORT_SEL_STATE_POLICY = 1 << 2,
|
||||
};
|
||||
|
||||
struct mlx5_ifc_query_hca_vport_gid_out_bits {
|
||||
u8 status[0x8];
|
||||
u8 reserved_at_8[0x18];
|
||||
|
Reference in New Issue
Block a user