[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20090624165421.GB18486@hmsreliant.think-freely.org>
Date: Wed, 24 Jun 2009 12:54:21 -0400
From: Neil Horman <nhorman@...driver.com>
To: Nicholas Van Orton <turanammo@...il.com>
Cc: netdev@...r.kernel.org
Subject: Re: e100 skb allocation
On Wed, Jun 24, 2009 at 09:58:38PM +0530, Nicholas Van Orton wrote:
> On Wed, Jun 24, 2009 at 4:17 PM, Neil Horman<nhorman@...driver.com> wrote:
> > On Wed, Jun 24, 2009 at 02:19:48PM +0530, Nicholas Van Orton wrote:
> >> Hello,
> >>
> >> For the Intel 8256 Ethernet Controller (e100.c), I notice that at the
> >> time of skb allocation using netdev_alloc_skb() and just before
> >> calling skb_reserve(), rx->skb->head and rx->skb->tail do not point to
> >> the same location. In fact they are already 16bytes apart. After
> >> calling skb_reserve(), which would add a 2 byte padding, head and
> >> tail would be 18 bytes apart. Is this behaviour correct? Shouldn't the
> >> ethernet header be 14+2 bytes after padding? Why aren't head and tail
> >> at the same location at the beginning?
> >>
> > Yes, its fine (although IIRC it should be 32, rather than 16 bytes).
> > netdev_alloc_skb, in its implementation, allocates an skb that is NET_SKB_PAD
> > bytes larger than the caller requested, then it calls skb_reserve internally to
> > add NET_SKB_PAD bytes of data to the skb's buffer.
> >
>
> Thanks a bunch for steering me in the right direction. Things are much
> clearer now.
>
No problem :)
Neil
--
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