netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: Anton Blanchard <anton@samba.org>
Cc: davem@redhat.com, netdev@oss.sgi.com
Subject: Re: Allow IP header alignment to be overriden
Date: Fri, 11 Jun 2004 03:35:22 +0200	[thread overview]
Message-ID: <20040611013522.GA9809@wotan.suse.de> (raw)
In-Reply-To: <20040611012727.GA27672@krispykreme>

> The following patch creates skb_align and allows an architecture to
> override it. Thoughts?

I like it. While we haven't seen specific networking performance issues
on Opteron yet it's certainly one architectures that doesn't care much
about misalignment. The Intel EM64T CPUs have a bit more penalty, but
also not much. It's certainly one optimization worth trying.

> + *	skb_align - align a buffer
> + *	@skb: buffer to alter
> + *	@len: bytes required to align
> + *
> + * 	Shift a buffer by len bytes for the purposes of alignment. On
> + * 	some architectures that handle unaligned accesses in hardware
> + * 	the effects of unaligned DMA is more costly so we allow it to
> + * 	be overridden. This is only allowed for an empty buffer.
> + */
> +#ifndef ARCH_HAS_SKB_ALIGN
> +#define skb_align(SKB, LEN)	skb_reserve((SKB), (LEN))
> +#endif

But where does this come from? There's no clear asm/ include in skbuff.h
matching it, and relying on indirect ones is probably not a good idea.

-Andi

  reply	other threads:[~2004-06-11  1:35 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 [this message]
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
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=20040611013522.GA9809@wotan.suse.de \
    --to=ak@suse.de \
    --cc=anton@samba.org \
    --cc=davem@redhat.com \
    --cc=netdev@oss.sgi.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).