diff options
author | Tariq Toukan <tariqt@mellanox.com> | 2018-05-22 16:43:54 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@mellanox.com> | 2018-07-26 15:23:56 -0700 |
commit | dac0d15fff6f825e93aafa6ba8bf24fd77ecb2ae (patch) | |
tree | 0ef308649df11eb9610d54b4bccd73dd13b982a3 /drivers/net/ethernet/mellanox/mlx5/core/en | |
parent | 890388ad6f6b3740265173fa5296ece5d945e977 (diff) | |
download | linux-dac0d15fff6f825e93aafa6ba8bf24fd77ecb2ae.tar.bz2 |
net/mlx5e: Re-order fields of struct mlx5e_xdpsq
In the downstream patch that adds support to XDP_REDIRECT-out,
the XDP xmit frame function doesn't share the same run context as
the NAPI that polls the XDP-SQ completion queue.
Hence, need to re-order the XDP-SQ fields to avoid cacheline
false-sharing.
Take redirect_flush and doorbell out of DB, into separated
cachelines.
Add a cacheline breaker within the stats struct.
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/en')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c b/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c index 26e24823504b..eabd5537927d 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c @@ -85,7 +85,7 @@ bool mlx5e_xdp_handle(struct mlx5e_rq *rq, struct mlx5e_dma_info *di, if (unlikely(err)) goto xdp_abort; __set_bit(MLX5E_RQ_FLAG_XDP_XMIT, rq->flags); - rq->xdpsq.db.redirect_flush = true; + rq->xdpsq.redirect_flush = true; mlx5e_page_dma_unmap(rq, di); rq->stats->xdp_redirect++; return true; @@ -124,10 +124,10 @@ bool mlx5e_xmit_xdp_frame(struct mlx5e_xdpsq *sq, struct mlx5e_xdp_info *xdpi) } if (unlikely(!mlx5e_wqc_has_room_for(wq, sq->cc, sq->pc, 1))) { - if (sq->db.doorbell) { + if (sq->doorbell) { /* SQ is full, ring doorbell */ mlx5e_xmit_xdp_doorbell(sq); - sq->db.doorbell = false; + sq->doorbell = false; } stats->full++; return false; @@ -156,7 +156,7 @@ bool mlx5e_xmit_xdp_frame(struct mlx5e_xdpsq *sq, struct mlx5e_xdp_info *xdpi) sq->db.xdpi[pi] = *xdpi; sq->pc++; - sq->db.doorbell = true; + sq->doorbell = true; stats->xmit++; return true; |