Thread (5 messages) 5 messages, 5 authors, 2011-09-01

Re: RFC - should network devices trim frames > soft mtu

flat view

From: Ben Greear <hidden>
Date: 2011-08-31 22:26:17

On 08/31/2011 03:18 PM, Stephen Hemminger wrote:
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.
Maybe that lets them use some kind of offload?

Either way, seems the pkt should be allowed to come up the
stack if the NIC can receive it and it's not otherwise funky.

Thanks,
Ben

-- 
Ben Greear [off-list ref]
Candela Technologies Inc  http://www.candelatech.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help