]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
net/mlx5e: Tx, Don't implicitly assume SKB-less wqe has one WQEBB
authorEran Ben Elisha <eranbe@mellanox.com>
Fri, 5 Jul 2019 15:30:18 +0000 (18:30 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 5 Jul 2019 23:29:19 +0000 (16:29 -0700)
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 <eranbe@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en_tx.c

index 983ea6206a947d6b8607fd0e4657fb6acb36be86..9740ca51921d09546b47f9d7954d140b44cfaa01 100644 (file)
@@ -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;
                        }