netdev
[Top] [All Lists]

Re: reasons for dev_alloc_skb +16?

To: ak@xxxxxxx
Subject: Re: reasons for dev_alloc_skb +16?
From: "David S. Miller" <davem@xxxxxxxxxx>
Date: Wed, 09 Jul 2003 17:20:12 -0700 (PDT)
Cc: jgarzik@xxxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <20030709175355.422545b5.ak@xxxxxxx>
References: <20030709152553.GB15293@xxxxxxx> <20030709175355.422545b5.ak@xxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
   From: Andi Kleen <ak@xxxxxxx>
   Date: Wed, 9 Jul 2003 17:53:55 +0200
   
   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.
   
Only "dumb cards" do that, smart ones rewind to the beginning of
the current cache line and ask for the whole thing instead of
pieces.

The +16 is actually needed to align the first hunk of the outgoing
packet so we can do a 16-byte aligned memcpy of the hard-header
cache as we build the packet.

Jeff, look at LL_RESERVED_SPACE() and the comment above it in
include/linux/netdevice.h


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