Skip to content

Commit

Permalink
bnx2x: added 'likely' to fast-path skb existence
Browse files Browse the repository at this point in the history
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Yuval Mintz authored and David S. Miller committed Mar 19, 2012
1 parent f1f3ee1 commit d8290ae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,11 @@ static u16 bnx2x_free_tx_pkt(struct bnx2x *bp, struct bnx2x_fp_txdata *txdata,

/* release skb */
WARN_ON(!skb);
if (skb) {
if (likely(skb)) {
(*pkts_compl)++;
(*bytes_compl) += skb->len;
}

dev_kfree_skb_any(skb);
tx_buf->first_bd = 0;
tx_buf->skb = NULL;
Expand Down

0 comments on commit d8290ae

Please sign in to comment.