mlx4_core: boot sriov
Subsystems (2)
PATCH v4 9/19 mlx4_core: boot sriov
Add virtual function device ids. Setting VF flag to device private data Establish comm channel when sriov is enabled, and boot vfs through it. Each slave gets one msi-X for completions, the master also gets one for async events.
Signed-off-by Liran Liss <liranl-VPRAkNaXOzVS1MOuV/[email protected]>
--- drivers/net/mlx4/eq.c | 5 +- drivers/net/mlx4/main.c | 307 +++++++++++++++++++++++++++++++++++----------- drivers/net/mlx4/mlx4.h | 4 + 3 files changed, 240 insertions(+), 76 deletions(-)
drivers/net/mlx4/eq.c +3 -2
@@ -805,13 +805,14 @@ int mlx4_init_eq_table(struct mlx4_dev *dev) priv->eq_table.eq[dev->caps.num_comp_vectors].eqn, err); } -for (i =0 ; i < dev->caps.num_comp_vectors +1 ; ++i) +for (i =0 ; i < dev->caps.num_comp_vectors + !(mlx4_is_slave (dev)); ++i)eq_set_ci (&priv->eq_table.eq[i],1 );return 0 ; err_out_async: -mlx4_free_eq (dev, &priv->eq_table.eq[dev->caps.num_comp_vectors]); +if (!mlx4_is_slave (dev)) +mlx4_free_eq (dev, &priv->eq_table.eq[dev->caps.num_comp_vectors]); err_out_comp: i = dev->caps.num_comp_vectors;
drivers/net/mlx4/main.c +233 -74
409 lines not on this page · raw message
drivers/net/mlx4/mlx4.h +4 -0
@@ -144,6 +144,10 @@ extern int mlx4_debug_level;#define MLX4_MAX_NUM_VF 64#define MLX4_MAX_NUM_SLAVES (MLX4_MAX_NUM_PF + MLX4_MAX_NUM_VF) +#define MLX4_VF (1 << 0) +#define MLX4_VDEVICE (vendor, device, flags) \ + PCI_VDEVICE(vendor, device), (flags) +struct mlx4_bitmap {u32 last;u32 top;
Signature · 6 lines
1.6.0.2 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html