Skip to content

Commit

Permalink
net/mlx5e: Avoid redundant dev_kfree_skb() upon NOP completion
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Achiad Shochat authored and David S. Miller committed Jun 24, 2015
1 parent ef583d0 commit 9fc5930
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/net/ethernet/mellanox/mlx5/core/en_tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand All @@ -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);
}

Expand Down

0 comments on commit 9fc5930

Please sign in to comment.