net/mlx5e: Avoid redundant dev_kfree_skb() upon NOP completion
authorAchiad Shochat <achiad@mellanox.com>
Tue, 23 Jun 2015 14:14:17 +0000 (17:14 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Jun 2015 07:42:37 +0000 (00:42 -0700)
NOP completion SKBs are always NULL.

Signed-off-by: Achiad Shochat <achiad@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en_tx.c

index c0566b6847780fb08d526e28c4a50ab49a4ba777..f5c7d78c64f7d5b81a063401946e7690689c5e88 100644 (file)
@@ -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);
        }