All of lore.kernel.org
 help / color / mirror / Atom feed
* RFC - should network devices trim frames > soft mtu
@ 2011-08-31 22:18 Stephen Hemminger
  2011-08-31 22:26 ` Ben Greear
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Stephen Hemminger @ 2011-08-31 22:18 UTC (permalink / raw)
  To: David Miller, Michael Chan; +Cc: netdev

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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-09-01  0:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-31 22:18 RFC - should network devices trim frames > soft mtu Stephen Hemminger
2011-08-31 22:26 ` Ben Greear
2011-08-31 22:27 ` Michael Chan
2011-09-01  0:10   ` David Lamparter
2011-08-31 22:45 ` Ben Hutchings

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.