aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/mlx4/mlx4_en.h
diff options
context:
space:
mode:
authorYevgeny Petrilin <yevgenyp@mellanox.co.il>2009-08-06 22:27:51 -0400
committerDavid S. Miller <davem@davemloft.net>2009-08-06 22:27:51 -0400
commitb6b912e0804dc1b3e856da3cc82fbe78b50e968c (patch)
treecc35371a7ad0caed0841183cf7356b398b1e9588 /drivers/net/mlx4/mlx4_en.h
parenta35ee541a66d11d26da30d3f6046dbddd073334e (diff)
mlx4_en: Using real number of rings as RSS map size
There is no point in using more QPs then actual number of receive rings. If the RSS function for two streams gives the same result modulo number of rings, they will arrive to the same RX ring anyway. Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/mlx4/mlx4_en.h')
-rw-r--r--drivers/net/mlx4/mlx4_en.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/net/mlx4/mlx4_en.h b/drivers/net/mlx4/mlx4_en.h
index c7c5e86804ff..2d76ff4c564b 100644
--- a/drivers/net/mlx4/mlx4_en.h
+++ b/drivers/net/mlx4/mlx4_en.h
@@ -95,8 +95,6 @@
95#define MLX4_EN_PAGE_SIZE (1 << MLX4_EN_PAGE_SHIFT) 95#define MLX4_EN_PAGE_SIZE (1 << MLX4_EN_PAGE_SHIFT)
96#define MAX_TX_RINGS 16 96#define MAX_TX_RINGS 16
97#define MAX_RX_RINGS 16 97#define MAX_RX_RINGS 16
98#define MAX_RSS_MAP_SIZE 64
99#define RSS_FACTOR 2
100#define TXBB_SIZE 64 98#define TXBB_SIZE 64
101#define HEADROOM (2048 / TXBB_SIZE + 1) 99#define HEADROOM (2048 / TXBB_SIZE + 1)
102#define STAMP_STRIDE 64 100#define STAMP_STRIDE 64
@@ -377,11 +375,9 @@ struct mlx4_en_dev {
377 375
378 376
379struct mlx4_en_rss_map { 377struct mlx4_en_rss_map {
380 int size;
381 int base_qpn; 378 int base_qpn;
382 u16 map[MAX_RSS_MAP_SIZE]; 379 struct mlx4_qp qps[MAX_RX_RINGS];
383 struct mlx4_qp qps[MAX_RSS_MAP_SIZE]; 380 enum mlx4_qp_state state[MAX_RX_RINGS];
384 enum mlx4_qp_state state[MAX_RSS_MAP_SIZE];
385 struct mlx4_qp indir_qp; 381 struct mlx4_qp indir_qp;
386 enum mlx4_qp_state indir_state; 382 enum mlx4_qp_state indir_state;
387}; 383};
@@ -555,9 +551,6 @@ int mlx4_en_map_buffer(struct mlx4_buf *buf);
555void mlx4_en_unmap_buffer(struct mlx4_buf *buf); 551void mlx4_en_unmap_buffer(struct mlx4_buf *buf);
556 552
557void mlx4_en_calc_rx_buf(struct net_device *dev); 553void mlx4_en_calc_rx_buf(struct net_device *dev);
558void mlx4_en_set_default_rss_map(struct mlx4_en_priv *priv,
559 struct mlx4_en_rss_map *rss_map,
560 int num_entries, int num_rings);
561int mlx4_en_config_rss_steer(struct mlx4_en_priv *priv); 554int mlx4_en_config_rss_steer(struct mlx4_en_priv *priv);
562void mlx4_en_release_rss_steer(struct mlx4_en_priv *priv); 555void mlx4_en_release_rss_steer(struct mlx4_en_priv *priv);
563int mlx4_en_free_tx_buf(struct net_device *dev, struct mlx4_en_tx_ring *ring); 556int mlx4_en_free_tx_buf(struct net_device *dev, struct mlx4_en_tx_ring *ring);