[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110831151823.23cfb7bc@nehalam.ftrdhcpuser.net>
Date: Wed, 31 Aug 2011 15:18:23 -0700
From: Stephen Hemminger <shemminger@...tta.com>
To: David Miller <davem@...emloft.net>,
Michael Chan <mchan@...adcom.com>
Cc: netdev@...r.kernel.org
Subject: RFC - should network devices trim frames > soft mtu
I noticed the following in the bnx2 driver.
static int
bnx2_rx_int(struct bnx2 *bp, struct bnx2_napi *bnapi, int budget)
{
...
skb->protocol = eth_type_trans(skb, bp->dev);
if ((len > (bp->dev->mtu + ETH_HLEN)) &&
(ntohs(skb->protocol) != 0x8100)) {
dev_kfree_skb(skb);
goto next_rx;
}
This means that for non-VLAN tagged frames, the device drops received
packets if the length is greater than the MTU. I don't see that in
other devices. What is the correct method? IMHO the bnx2 driver is
wrong here and if the policy is desired it should be enforced at
the next level (netif_receive_skb). Hardcoding a protocol value is
kind of a giveaway that something is fishy.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists