summaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2x_main.c
diff options
context:
space:
mode:
authorEilon Greenstein <eilong@broadcom.com>2008-08-14 00:48:29 +0200
committerDavid S. Miller <davem@davemloft.net>2008-08-14 01:01:14 +0200
commit1adcd8bee37f494e22aee856467e994ae086ae45 (patch)
tree81645cb54ff4fa876a2c67974db2e7d29fe9cf33 /drivers/net/bnx2x_main.c
parentbnx2x: FW (bootcode) interface fixes (diff)
downloadlinux-1adcd8bee37f494e22aee856467e994ae086ae45.tar.xz
linux-1adcd8bee37f494e22aee856467e994ae086ae45.zip
bnx2x: Not dropping packets with L3/L4 checksum error
Not dropping packets with L3/L4 checksum error Those packets should be passed to the OS. The problem is clear in forwarding mode. Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2x_main.c')
-rw-r--r--drivers/net/bnx2x_main.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
index 9eb8a3e6d629..b9d376d972ca 100644
--- a/drivers/net/bnx2x_main.c
+++ b/drivers/net/bnx2x_main.c
@@ -1501,7 +1501,6 @@ static int bnx2x_rx_int(struct bnx2x_fastpath *fp, int budget)
/* is this an error packet? */
if (unlikely(cqe_fp_flags & ETH_RX_ERROR_FALGS)) {
- /* do we sometimes forward error packets anyway? */
DP(NETIF_MSG_RX_ERR,
"ERROR flags %x rx packet %u\n",
cqe_fp_flags, sw_comp_cons);
@@ -1557,10 +1556,10 @@ reuse_rx:
skb->protocol = eth_type_trans(skb, bp->dev);
skb->ip_summed = CHECKSUM_NONE;
- if (bp->rx_csum && BNX2X_RX_SUM_OK(cqe))
- skb->ip_summed = CHECKSUM_UNNECESSARY;
+ if (bp->rx_csum)
+ if (likely(BNX2X_RX_CSUM_OK(cqe)))
+ skb->ip_summed = CHECKSUM_UNNECESSARY;
- /* TBD do we pass bad csum packets in promisc */
}
#ifdef BCM_VLAN