diff options
Diffstat (limited to 'drivers/net/mlx4/mlx4_en.h')
-rw-r--r-- | drivers/net/mlx4/mlx4_en.h | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/drivers/net/mlx4/mlx4_en.h b/drivers/net/mlx4/mlx4_en.h index c7c5e86804ff..4513fb4960dc 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 |
@@ -276,13 +274,11 @@ struct mlx4_en_tx_ring { | |||
276 | }; | 274 | }; |
277 | 275 | ||
278 | struct mlx4_en_rx_desc { | 276 | struct mlx4_en_rx_desc { |
279 | struct mlx4_wqe_srq_next_seg next; | ||
280 | /* actual number of entries depends on rx ring stride */ | 277 | /* actual number of entries depends on rx ring stride */ |
281 | struct mlx4_wqe_data_seg data[0]; | 278 | struct mlx4_wqe_data_seg data[0]; |
282 | }; | 279 | }; |
283 | 280 | ||
284 | struct mlx4_en_rx_ring { | 281 | struct mlx4_en_rx_ring { |
285 | struct mlx4_srq srq; | ||
286 | struct mlx4_hwq_resources wqres; | 282 | struct mlx4_hwq_resources wqres; |
287 | struct mlx4_en_rx_alloc page_alloc[MLX4_EN_MAX_RX_FRAGS]; | 283 | struct mlx4_en_rx_alloc page_alloc[MLX4_EN_MAX_RX_FRAGS]; |
288 | struct net_lro_mgr lro; | 284 | struct net_lro_mgr lro; |
@@ -377,11 +373,9 @@ struct mlx4_en_dev { | |||
377 | 373 | ||
378 | 374 | ||
379 | struct mlx4_en_rss_map { | 375 | struct mlx4_en_rss_map { |
380 | int size; | ||
381 | int base_qpn; | 376 | int base_qpn; |
382 | u16 map[MAX_RSS_MAP_SIZE]; | 377 | struct mlx4_qp qps[MAX_RX_RINGS]; |
383 | struct mlx4_qp qps[MAX_RSS_MAP_SIZE]; | 378 | enum mlx4_qp_state state[MAX_RX_RINGS]; |
384 | enum mlx4_qp_state state[MAX_RSS_MAP_SIZE]; | ||
385 | struct mlx4_qp indir_qp; | 379 | struct mlx4_qp indir_qp; |
386 | enum mlx4_qp_state indir_state; | 380 | enum mlx4_qp_state indir_state; |
387 | }; | 381 | }; |
@@ -531,7 +525,7 @@ int mlx4_en_create_tx_ring(struct mlx4_en_priv *priv, struct mlx4_en_tx_ring *ri | |||
531 | void mlx4_en_destroy_tx_ring(struct mlx4_en_priv *priv, struct mlx4_en_tx_ring *ring); | 525 | void mlx4_en_destroy_tx_ring(struct mlx4_en_priv *priv, struct mlx4_en_tx_ring *ring); |
532 | int mlx4_en_activate_tx_ring(struct mlx4_en_priv *priv, | 526 | int mlx4_en_activate_tx_ring(struct mlx4_en_priv *priv, |
533 | struct mlx4_en_tx_ring *ring, | 527 | struct mlx4_en_tx_ring *ring, |
534 | int cq, int srqn); | 528 | int cq); |
535 | void mlx4_en_deactivate_tx_ring(struct mlx4_en_priv *priv, | 529 | void mlx4_en_deactivate_tx_ring(struct mlx4_en_priv *priv, |
536 | struct mlx4_en_tx_ring *ring); | 530 | struct mlx4_en_tx_ring *ring); |
537 | 531 | ||
@@ -548,16 +542,13 @@ int mlx4_en_process_rx_cq(struct net_device *dev, | |||
548 | int budget); | 542 | int budget); |
549 | int mlx4_en_poll_rx_cq(struct napi_struct *napi, int budget); | 543 | int mlx4_en_poll_rx_cq(struct napi_struct *napi, int budget); |
550 | void mlx4_en_fill_qp_context(struct mlx4_en_priv *priv, int size, int stride, | 544 | void mlx4_en_fill_qp_context(struct mlx4_en_priv *priv, int size, int stride, |
551 | int is_tx, int rss, int qpn, int cqn, int srqn, | 545 | int is_tx, int rss, int qpn, int cqn, |
552 | struct mlx4_qp_context *context); | 546 | struct mlx4_qp_context *context); |
553 | void mlx4_en_sqp_event(struct mlx4_qp *qp, enum mlx4_event event); | 547 | void mlx4_en_sqp_event(struct mlx4_qp *qp, enum mlx4_event event); |
554 | int mlx4_en_map_buffer(struct mlx4_buf *buf); | 548 | int mlx4_en_map_buffer(struct mlx4_buf *buf); |
555 | void mlx4_en_unmap_buffer(struct mlx4_buf *buf); | 549 | void mlx4_en_unmap_buffer(struct mlx4_buf *buf); |
556 | 550 | ||
557 | void mlx4_en_calc_rx_buf(struct net_device *dev); | 551 | void mlx4_en_calc_rx_buf(struct net_device *dev); |
558 | void 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); | ||
561 | int mlx4_en_config_rss_steer(struct mlx4_en_priv *priv); | 552 | int mlx4_en_config_rss_steer(struct mlx4_en_priv *priv); |
562 | void mlx4_en_release_rss_steer(struct mlx4_en_priv *priv); | 553 | void mlx4_en_release_rss_steer(struct mlx4_en_priv *priv); |
563 | int mlx4_en_free_tx_buf(struct net_device *dev, struct mlx4_en_tx_ring *ring); | 554 | int mlx4_en_free_tx_buf(struct net_device *dev, struct mlx4_en_tx_ring *ring); |