Skip to content

Commit db02a30

Browse files
Tariq ToukanSaeed Mahameed
authored andcommitted
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>
1 parent feb2ff9 commit db02a30

File tree

1 file changed

+5
-0
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core/en

1 file changed

+5
-0
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,11 @@ bool mlx5e_poll_xdpsq_cq(struct mlx5e_cq *cq, struct mlx5e_rq *rq)
197197

198198
wqe_counter = be16_to_cpu(cqe->wqe_counter);
199199

200+
if (unlikely(get_cqe_opcode(cqe) != MLX5_CQE_REQ))
201+
netdev_WARN_ONCE(sq->channel->netdev,
202+
"Bad OP in XDPSQ CQE: 0x%x\n",
203+
get_cqe_opcode(cqe));
204+
200205
do {
201206
u16 ci = mlx5_wq_cyc_ctr2ix(&sq->wq, sqcc);
202207
struct mlx5e_xdp_info *xdpi = &sq->db.xdpi[ci];

0 commit comments

Comments
 (0)