Skip to content

Commit

Permalink
bnx2x: properly update skb when mtu > 1500
Browse files Browse the repository at this point in the history
Since commit e52fcb2 newly allocated
skb for small packets are not updated properly and dropped by stack.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dmitry Kravkov authored and David S. Miller committed Dec 13, 2011
1 parent 90b41a1 commit 036d2df
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
Original file line number Diff line number Diff line change
Expand Up @@ -731,22 +731,22 @@ int bnx2x_rx_int(struct bnx2x_fastpath *fp, int budget)
bnx2x_reuse_rx_data(fp, bd_cons, bd_prod);
goto next_rx;
}
}

skb_put(skb, len);
skb->protocol = eth_type_trans(skb, bp->dev);
skb_put(skb, len);
skb->protocol = eth_type_trans(skb, bp->dev);

/* Set Toeplitz hash for a none-LRO skb */
skb->rxhash = bnx2x_get_rxhash(bp, cqe_fp);
/* Set Toeplitz hash for a none-LRO skb */
skb->rxhash = bnx2x_get_rxhash(bp, cqe_fp);

skb_checksum_none_assert(skb);
skb_checksum_none_assert(skb);

if (bp->dev->features & NETIF_F_RXCSUM) {
if (bp->dev->features & NETIF_F_RXCSUM) {

if (likely(BNX2X_RX_CSUM_OK(cqe)))
skb->ip_summed = CHECKSUM_UNNECESSARY;
else
fp->eth_q_stats.hw_csum_err++;
}
if (likely(BNX2X_RX_CSUM_OK(cqe)))
skb->ip_summed = CHECKSUM_UNNECESSARY;
else
fp->eth_q_stats.hw_csum_err++;
}

skb_record_rx_queue(skb, fp->rx_queue);
Expand Down

0 comments on commit 036d2df

Please sign in to comment.