Re: [PATCH 2.6.14-rc2] aoe [1/2]: explicitly set minimum packet length to ETH_ZLEN

Ben Dooks
2005-09-26T17:14:32Z

On Mon, Sep 26, 2005 at 12:50:28PM -0400, Ed L Cashin wrote:
> "Ed L. Cashin" <ecashin@coraid.com> writes:
>
> ...
> > Explicitly set the minimum packet length to ETH_ZLEN.
> >
> > Index: 2.6.14-rc2-aoe/drivers/block/aoe/aoecmd.c
> > ===================================================================
> > --- 2.6.14-rc2-aoe.orig/drivers/block/aoe/aoecmd.c 2005-09-26 12:20:34.000000000 -0400
> > +++ 2.6.14-rc2-aoe/drivers/block/aoe/aoecmd.c 2005-09-26 12:27:49.000000000 -0400
> > @@ -20,6 +20,9 @@
> > {
> > struct sk_buff *skb;
> >
> > + if (len < ETH_ZLEN)
> > + len = ETH_ZLEN;
> > +
> > skb = alloc_skb(len, GFP_ATOMIC);
>
> This change fixes some strange problems observed on a system that was
> using the e1000 network driver. Is the network driver supposed to
> ensure that ethernet packets are up to spec, at least 60 bytes long?

I belive that 802.3 defines that a packet should be
of at least 64 octets. I belive most ethernet controllers
should consider anything smaller as a `runt`, but as
usual, YMMV.

--
Ben (ben@fluff.org, http://www.fluff.org/)

'a smiley only costs 4 bytes'