From: Eran Ben Elisha Date: Fri, 5 Jul 2019 15:30:18 +0000 (+0300) Subject: net/mlx5e: Tx, Don't implicitly assume SKB-less wqe has one WQEBB X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=9ab0233728cab92575eee90a86cda639ef34ba57;p=linux.git net/mlx5e: Tx, Don't implicitly assume SKB-less wqe has one WQEBB When polling a CQE of an SKB-less WQE, don't assume it consumed only one WQEBB. Use wi->num_wqebbs directly instead. In the downstream patch, SKB-less WQEs might have more the one WQEBB, thus this change is needed. Signed-off-by: Eran Ben Elisha Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c index 983ea6206a947..9740ca51921d0 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c @@ -485,8 +485,8 @@ bool mlx5e_poll_tx_cq(struct mlx5e_cq *cq, int napi_budget) wi = &sq->db.wqe_info[ci]; skb = wi->skb; - if (unlikely(!skb)) { /* nop */ - sqcc++; + if (unlikely(!skb)) { + sqcc += wi->num_wqebbs; continue; }