aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mlx4
diff options
context:
space:
mode:
authorMatan Barak <matanb@mellanox.com>2015-05-31 02:30:16 -0400
committerDavid S. Miller <davem@davemloft.net>2015-05-31 02:35:34 -0400
commitc66fa19c405a36673d4aab13658c8246413d5c0f (patch)
treed2958abf16fbeaeda35ec26bc0f887e2dcde5354 /include/linux/mlx4
parent48564135cba806bd0d6d1704c0ea317318966d9f (diff)
net/mlx4: Add EQ pool
Previously, mlx4_en allocated EQs and used them exclusively. This affected RoCE performance, as applications which are events sensitive were limited to use only the legacy EQs. Change that by introducing an EQ pool. This pool is managed by mlx4_core. EQs are assigned to ports (when there are limited number of EQs, multiple ports could be assigned to the same EQs). An exception to this rule is the ASYNC EQ which handles various events. Legacy EQs are completely removed as all EQs could be shared. When a consumer (mlx4_ib/mlx4_en) requests an EQ, it asks for EQ serving on a specific port. The core driver calculates which EQ should be assigned to that request. Because IRQs are shared between IB and Ethernet modules, their names only include the PCI device BDF address. Signed-off-by: Matan Barak <matanb@mellanox.com> Signed-off-by: Ido Shamay <idos@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/mlx4')
-rw-r--r--include/linux/mlx4/device.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h
index 83e80ab94500..ad31e476873f 100644
--- a/include/linux/mlx4/device.h
+++ b/include/linux/mlx4/device.h
@@ -46,8 +46,9 @@
46 46
47#define MAX_MSIX_P_PORT 17 47#define MAX_MSIX_P_PORT 17
48#define MAX_MSIX 64 48#define MAX_MSIX 64
49#define MSIX_LEGACY_SZ 4
50#define MIN_MSIX_P_PORT 5 49#define MIN_MSIX_P_PORT 5
50#define MLX4_IS_LEGACY_EQ_MODE(dev_cap) ((dev_cap).num_comp_vectors < \
51 (dev_cap).num_ports * MIN_MSIX_P_PORT)
51 52
52#define MLX4_MAX_100M_UNITS_VAL 255 /* 53#define MLX4_MAX_100M_UNITS_VAL 255 /*
53 * work around: can't set values 54 * work around: can't set values
@@ -528,7 +529,6 @@ struct mlx4_caps {
528 int num_eqs; 529 int num_eqs;
529 int reserved_eqs; 530 int reserved_eqs;
530 int num_comp_vectors; 531 int num_comp_vectors;
531 int comp_pool;
532 int num_mpts; 532 int num_mpts;
533 int max_fmr_maps; 533 int max_fmr_maps;
534 int num_mtts; 534 int num_mtts;
@@ -1332,10 +1332,13 @@ void mlx4_fmr_unmap(struct mlx4_dev *dev, struct mlx4_fmr *fmr,
1332int mlx4_fmr_free(struct mlx4_dev *dev, struct mlx4_fmr *fmr); 1332int mlx4_fmr_free(struct mlx4_dev *dev, struct mlx4_fmr *fmr);
1333int mlx4_SYNC_TPT(struct mlx4_dev *dev); 1333int mlx4_SYNC_TPT(struct mlx4_dev *dev);
1334int mlx4_test_interrupts(struct mlx4_dev *dev); 1334int mlx4_test_interrupts(struct mlx4_dev *dev);
1335int mlx4_assign_eq(struct mlx4_dev *dev, char *name, struct cpu_rmap *rmap, 1335u32 mlx4_get_eqs_per_port(struct mlx4_dev *dev, u8 port);
1336 int *vector); 1336bool mlx4_is_eq_vector_valid(struct mlx4_dev *dev, u8 port, int vector);
1337struct cpu_rmap *mlx4_get_cpu_rmap(struct mlx4_dev *dev, int port);
1338int mlx4_assign_eq(struct mlx4_dev *dev, u8 port, int *vector);
1337void mlx4_release_eq(struct mlx4_dev *dev, int vec); 1339void mlx4_release_eq(struct mlx4_dev *dev, int vec);
1338 1340
1341int mlx4_is_eq_shared(struct mlx4_dev *dev, int vector);
1339int mlx4_eq_get_irq(struct mlx4_dev *dev, int vec); 1342int mlx4_eq_get_irq(struct mlx4_dev *dev, int vec);
1340 1343
1341int mlx4_get_phys_port_id(struct mlx4_dev *dev); 1344int mlx4_get_phys_port_id(struct mlx4_dev *dev);