summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTariq Toukan <tariqt@mellanox.com>2018-11-15 10:48:41 +0100
committerSaeed Mahameed <saeedm@mellanox.com>2018-12-21 07:54:18 +0100
commitdb02a308cd724fd37416012c8077d3e0ea2bf386 (patch)
tree70b7da1a0bf3af295b111719fcd4d5aeb5a58fbf
parentnet/mlx5e: XDP, Change the XDP SQ redirect indication (diff)
downloadlinux-db02a308cd724fd37416012c8077d3e0ea2bf386.tar.xz
linux-db02a308cd724fd37416012c8077d3e0ea2bf386.zip
net/mlx5e: XDP, Warn upon polling an error CQE
Do not ignore the CQE opcode. This helps expose issues and debug them. Signed-off-by: Tariq Toukan <tariqt@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c b/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c
index 4961b8fea111..407e285b0430 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c
@@ -197,6 +197,11 @@ bool mlx5e_poll_xdpsq_cq(struct mlx5e_cq *cq, struct mlx5e_rq *rq)
wqe_counter = be16_to_cpu(cqe->wqe_counter);
+ if (unlikely(get_cqe_opcode(cqe) != MLX5_CQE_REQ))
+ netdev_WARN_ONCE(sq->channel->netdev,
+ "Bad OP in XDPSQ CQE: 0x%x\n",
+ get_cqe_opcode(cqe));
+
do {
u16 ci = mlx5_wq_cyc_ctr2ix(&sq->wq, sqcc);
struct mlx5e_xdp_info *xdpi = &sq->db.xdpi[ci];