summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.h
diff options
context:
space:
mode:
authorTariq Toukan <tariqt@mellanox.com>2018-11-21 14:06:02 +0200
committerSaeed Mahameed <saeedm@mellanox.com>2018-12-20 22:54:18 -0800
commitb8180392edd97cd5bfdf12270315a72fe601cf7e (patch)
treeeee72504792ef69d27fa3d2e9e92c5097e81e371 /drivers/net/ethernet/mellanox/mlx5/core/en/xdp.h
parentdb02a308cd724fd37416012c8077d3e0ea2bf386 (diff)
downloadlinux-next-b8180392edd97cd5bfdf12270315a72fe601cf7e.tar.gz
net/mlx5e: XDP, Replace boolean doorbell indication with segment pointer
Instead of calculating the control segment to be used upon an XDP xmit doorbell, save it in SQ structure. Nullify when no pending doorbell. 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/xdp.h')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en/xdp.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.h b/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.h
index 37fcb17e7f27..e2faf869e77c 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.h
@@ -51,13 +51,10 @@ int mlx5e_xdp_xmit(struct net_device *dev, int n, struct xdp_frame **frames,
static inline void mlx5e_xmit_xdp_doorbell(struct mlx5e_xdpsq *sq)
{
- struct mlx5_wq_cyc *wq = &sq->wq;
- struct mlx5e_tx_wqe *wqe;
- u16 pi = mlx5_wq_cyc_ctr2ix(wq, sq->pc - 1); /* last pi */
-
- wqe = mlx5_wq_cyc_get_wqe(wq, pi);
-
- mlx5e_notify_hw(wq, sq->pc, sq->uar_map, &wqe->ctrl);
+ if (sq->doorbell_cseg) {
+ mlx5e_notify_hw(&sq->wq, sq->pc, sq->uar_map, sq->doorbell_cseg);
+ sq->doorbell_cseg = NULL;
+ }
}
#endif