[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b9e8fcbd0906240928h6c5db9a6va48e42799376149e@mail.gmail.com>
Date: Wed, 24 Jun 2009 21:58:38 +0530
From: Nicholas Van Orton <turanammo@...il.com>
To: Neil Horman <nhorman@...driver.com>
Cc: netdev@...r.kernel.org
Subject: Re: e100 skb allocation
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.
Regards,
Nicholas
--
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