All of lore.kernel.org
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@redhat.com>
To: Anton Blanchard <anton@samba.org>
Cc: sfeldma@pobox.com, netdev@oss.sgi.com
Subject: Re: Allow IP header alignment to be overriden
Date: Sat, 12 Jun 2004 11:12:18 -0700	[thread overview]
Message-ID: <20040612111218.783f587d.davem@redhat.com> (raw)
In-Reply-To: <20040611142336.GE27672@krispykreme>

On Sat, 12 Jun 2004 00:23:37 +1000
Anton Blanchard <anton@samba.org> wrote:

> Would creating:
> 
> /* 
>  * Network drivers want to align IP headers. Since we have 14 bytes of
>  * ethernet header, adding 2 bytes will align the IP header.  However
>  * this will mean we do unaligned DMA so there is a trade off.
>  *
>  * We allow this to be overridden per arch as the unaligned DMA cost may
>  * outweigh the unaligned CPU cost.
>  */
> #ifndef NET_IP_ALIGN
> #define NET_IP_ALIGN 2
> #endif
> 
> Instead of skb_align make more sense? It does have the advantage of
> removing another magic number.

Yes.  Please add a paragraph to that comment explaining what "unaligned
CPU cost" really means, ie. that the IP/TCP header members are going to
be accessed with alignment less than the types might require on a given
architecture.

Then I'll apply this and we can start beating up the drivers.

  reply	other threads:[~2004-06-12 18:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-11  1:27 Allow IP header alignment to be overriden Anton Blanchard
2004-06-11  1:35 ` Andi Kleen
2004-06-11  1:43   ` Anton Blanchard
2004-06-11  5:35 ` David S. Miller
2004-06-11  7:39   ` Scott Feldman
2004-06-11 14:23     ` Anton Blanchard
2004-06-12 18:12       ` David S. Miller [this message]
2004-06-15 23:34         ` Anton Blanchard
2004-06-16  4:37           ` David S. Miller
2004-06-11 12:41   ` jamal
2004-06-11 14:08   ` Anton Blanchard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040612111218.783f587d.davem@redhat.com \
    --to=davem@redhat.com \
    --cc=anton@samba.org \
    --cc=netdev@oss.sgi.com \
    --cc=sfeldma@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.