diff options
author | Tariq Toukan <tariqt@mellanox.com> | 2018-04-02 17:31:31 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@mellanox.com> | 2018-06-02 02:48:15 +0300 |
commit | 99cbfa93a6122b1e9011d3f4e94b58e10d2f5cd0 (patch) | |
tree | 4d52d8efdc205ba751faa77b948db77803f07f2e /drivers/net/ethernet/mellanox/mlx5/core/wq.c | |
parent | 422d4c401edd186722d7530ffdaf11a6bb542cab (diff) | |
download | linux-99cbfa93a6122b1e9011d3f4e94b58e10d2f5cd0.tar.xz |
net/mlx5e: RX, Use cyclic WQ in legacy RQ
Now that LRO is not supported for Legacy RQ, there is no source of
out-of-order completions in the WQ, and we can use a cyclic one.
This has multiple advantages:
- reduces the WQE size (smaller PCI transactions).
- lower overhead in datapath (no handling of 'next' pointers).
- no reserved WQE for the WQ head (was need in linked-list).
- allows using a constant map between frag and dma_info struct, in downstream patch.
Performance tests:
ConnectX-4, single core, single RX ring.
Major gain in packet rate of single ring XDP drop.
Bottleneck is shifted form HW (at 16Mpps) to SW (at 20Mpps).
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/wq.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/wq.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/wq.c b/drivers/net/ethernet/mellanox/mlx5/core/wq.c index 5b8b35392025..b97bb72b4db4 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/wq.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/wq.c @@ -85,6 +85,7 @@ int mlx5_wq_cyc_create(struct mlx5_core_dev *mdev, struct mlx5_wq_param *param, mlx5_fill_fbc(MLX5_GET(wq, wqc, log_wq_stride), MLX5_GET(wq, wqc, log_wq_sz), fbc); + wq->sz = wq->fbc.sz_m1 + 1; err = mlx5_db_alloc_node(mdev, &wq_ctrl->db, param->db_numa_node); if (err) { |