netdev
[Top] [All Lists]

Re: reasons for dev_alloc_skb +16?

To: Jeff Garzik <jgarzik@xxxxxxxxx>
Subject: Re: reasons for dev_alloc_skb +16?
From: Andi Kleen <ak@xxxxxxx>
Date: Wed, 9 Jul 2003 17:53:55 +0200
Cc: netdev@xxxxxxxxxxx
In-reply-to: <20030709152553.GB15293@gtf.org>
References: <20030709152553.GB15293@gtf.org>
Sender: netdev-bounce@xxxxxxxxxxx
On Wed, 9 Jul 2003 11:25:53 -0400
Jeff Garzik <jgarzik@xxxxxxxxx> wrote:

> I knew this at one time, but have forgotten it :)
> 
> What is the reason for adding 16 to the dev_alloc_skb length?
> (and skb_reserve of the same length)

For the skb_reserve alignment to align the IP header. 

But it's not clear it is still a good idea because it leads to cache line 
misalignment of the beginning of the packet, forcing the card to do a
costly Read-Modify-Write cycle.

-Andi

<Prev in Thread] Current Thread [Next in Thread>