net/mlx4: Add data structures to support N-Ports per VF
Adds the required data structures to support VFs with N (1 or 2) ports instead of always using the number of physical ports. Signed-off-by: Matan Barak <matanb@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
82373701be
commit
1ab95d37bc
@@ -84,6 +84,7 @@ enum {
|
||||
enum {
|
||||
MLX4_MAX_NUM_PF = 16,
|
||||
MLX4_MAX_NUM_VF = 64,
|
||||
MLX4_MAX_NUM_VF_P_PORT = 64,
|
||||
MLX4_MFUNC_MAX = 80,
|
||||
MLX4_MAX_EQ_NUM = 1024,
|
||||
MLX4_MFUNC_EQ_NUM = 4,
|
||||
@@ -664,6 +665,11 @@ struct mlx4_quotas {
|
||||
int xrcd;
|
||||
};
|
||||
|
||||
struct mlx4_vf_dev {
|
||||
u8 min_port;
|
||||
u8 n_ports;
|
||||
};
|
||||
|
||||
struct mlx4_dev {
|
||||
struct pci_dev *pdev;
|
||||
unsigned long flags;
|
||||
@@ -679,6 +685,7 @@ struct mlx4_dev {
|
||||
int oper_log_mgm_entry_size;
|
||||
u64 regid_promisc_array[MLX4_MAX_PORTS + 1];
|
||||
u64 regid_allmulti_array[MLX4_MAX_PORTS + 1];
|
||||
struct mlx4_vf_dev *dev_vfs;
|
||||
};
|
||||
|
||||
struct mlx4_eqe {
|
||||
|
Reference in New Issue
Block a user