Commit 15143bf5 authored by Tariq Toukan's avatar Tariq Toukan Committed by Saeed Mahameed

net/mlx5e: XDP, Enhance RQ indication for XDP redirect flush

The XDP redirect flush indication belongs to the receive queue,
not to its XDP send queue.

For this, use a new bit on rq->flags.
Signed-off-by: default avatarTariq Toukan <tariqt@mellanox.com>
Reviewed-by: default avatarShay Agroskin <shayag@mellanox.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
parent f03590f7
...@@ -428,7 +428,6 @@ struct mlx5e_xdpsq { ...@@ -428,7 +428,6 @@ struct mlx5e_xdpsq {
/* dirtied @completion */ /* dirtied @completion */
u32 xdpi_fifo_cc; u32 xdpi_fifo_cc;
u16 cc; u16 cc;
bool redirect_flush;
/* dirtied @xmit */ /* dirtied @xmit */
u32 xdpi_fifo_pc ____cacheline_aligned_in_smp; u32 xdpi_fifo_pc ____cacheline_aligned_in_smp;
...@@ -532,6 +531,7 @@ typedef void (*mlx5e_fp_dealloc_wqe)(struct mlx5e_rq*, u16); ...@@ -532,6 +531,7 @@ typedef void (*mlx5e_fp_dealloc_wqe)(struct mlx5e_rq*, u16);
enum mlx5e_rq_flag { enum mlx5e_rq_flag {
MLX5E_RQ_FLAG_XDP_XMIT, MLX5E_RQ_FLAG_XDP_XMIT,
MLX5E_RQ_FLAG_XDP_REDIRECT,
}; };
struct mlx5e_rq_frag_info { struct mlx5e_rq_frag_info {
......
...@@ -85,7 +85,7 @@ bool mlx5e_xdp_handle(struct mlx5e_rq *rq, struct mlx5e_dma_info *di, ...@@ -85,7 +85,7 @@ bool mlx5e_xdp_handle(struct mlx5e_rq *rq, struct mlx5e_dma_info *di,
if (unlikely(err)) if (unlikely(err))
goto xdp_abort; goto xdp_abort;
__set_bit(MLX5E_RQ_FLAG_XDP_XMIT, rq->flags); __set_bit(MLX5E_RQ_FLAG_XDP_XMIT, rq->flags);
rq->xdpsq.redirect_flush = true; __set_bit(MLX5E_RQ_FLAG_XDP_REDIRECT, rq->flags);
mlx5e_page_dma_unmap(rq, di); mlx5e_page_dma_unmap(rq, di);
rq->stats->xdp_redirect++; rq->stats->xdp_redirect++;
return true; return true;
...@@ -419,9 +419,9 @@ void mlx5e_xdp_rx_poll_complete(struct mlx5e_rq *rq) ...@@ -419,9 +419,9 @@ void mlx5e_xdp_rx_poll_complete(struct mlx5e_rq *rq)
mlx5e_xmit_xdp_doorbell(xdpsq); mlx5e_xmit_xdp_doorbell(xdpsq);
if (xdpsq->redirect_flush) { if (test_bit(MLX5E_RQ_FLAG_XDP_REDIRECT, rq->flags)) {
xdp_do_flush_map(); xdp_do_flush_map();
xdpsq->redirect_flush = false; __clear_bit(MLX5E_RQ_FLAG_XDP_REDIRECT, rq->flags);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment