From 9fc5930625bcf7c519db84023ec720e7f2f7f61c Mon Sep 17 00:00:00 2001 From: Achiad Shochat Date: Tue, 23 Jun 2015 17:14:17 +0300 Subject: [PATCH] net/mlx5e: Avoid redundant dev_kfree_skb() upon NOP completion NOP completion SKBs are always NULL. Signed-off-by: Achiad Shochat Signed-off-by: Saeed Mahameed Signed-off-by: Or Gerlitz Signed-off-by: David S. Miller --- drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c index c0566b684778..f5c7d78c64f7 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c @@ -294,7 +294,7 @@ bool mlx5e_poll_tx_cq(struct mlx5e_cq *cq) if (unlikely(!skb)) { /* nop */ sq->stats.nop++; sqcc++; - goto free_skb; + continue; } for (j = 0; j < MLX5E_TX_SKB_CB(skb)->num_dma; j++) { @@ -309,8 +309,6 @@ bool mlx5e_poll_tx_cq(struct mlx5e_cq *cq) npkts++; nbytes += MLX5E_TX_SKB_CB(skb)->num_bytes; sqcc += MLX5E_TX_SKB_CB(skb)->num_wqebbs; - -free_skb: dev_kfree_skb(skb); } -- 2.39.5