All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@linux-foundation.org>
To: Philip Craig <philipc@snapgear.com>
Cc: Francois Romieu <romieu@fr.zoreil.com>,
	Mike Isely <isely@pobox.com>, Jeff Garzik <jeff@garzik.org>,
	netdev@vger.kernel.org
Subject: Re: [PATCH 4/5] r8169: more alignment for the 0x8168
Date: Mon, 26 Feb 2007 14:25:28 -0800	[thread overview]
Message-ID: <20070226142528.6b68a0cb@freekitty> (raw)
In-Reply-To: <45E28F63.8000208@snapgear.com>

On Mon, 26 Feb 2007 17:42:27 +1000
Philip Craig <philipc@snapgear.com> wrote:

> Francois Romieu wrote:
> > The experimental r8169 patch of the day against 2.6.21-rc1 is available at:
> > http://www.fr.zoreil.com/linux/kernel/2.6.x/2.6.21-rc1/
> 
> Is 0006-r8169-confusion-between-hardware-and-IP-header-alignment.txt
> the only relevant patch?
> 
> This only partially helps.  Many of the packets are greater than 200
> bytes so copybreak doesn't apply to them.
> 
> Can we assume anything about the alignment of skb->data?  I think it
> should be 4 byte aligned, otherwise the whole NET_IP_ALIGN thing
> won't work.  All the drivers I looked at just reserve NET_IP_ALIGN
> without checking the alignment first.
>

This is where the alignment comes from in slab.c

#ifndef ARCH_KMALLOC_MINALIGN
/*
 * Enforce a minimum alignment for the kmalloc caches.
 * Usually, the kmalloc caches are cache_line_size() aligned, except when
 * DEBUG and FORCED_DEBUG are enabled, then they are BYTES_PER_WORD aligned.
 * Some archs want to perform DMA into kmalloc caches and need a guaranteed
 * alignment larger than BYTES_PER_WORD. ARCH_KMALLOC_MINALIGN allows that.
 * Note that this flag disables some debug features.
 */
#define ARCH_KMALLOC_MINALIGN 0
#endif

Since BYTES_PER_WORD is sizeof(void *) you are safe since Linux doesn't
run on 16 bit platforms.

-- 
Stephen Hemminger <shemminger@linux-foundation.org>

  reply	other threads:[~2007-02-26 22:26 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-03 23:52 [PATCH 0/5] Pull request for 'r8169-upstream-20061204-00' tag Francois Romieu
2006-12-03 23:54 ` [PATCH 1/5] r8169: more magic during initialization of the hardware Francois Romieu
2006-12-06  5:28   ` Philip Craig
2006-12-03 23:58 ` [PATCH 2/5] r8169: tweak the PCI data parity error recovery Francois Romieu
2006-12-03 23:59   ` [PATCH 3/5] r8169: phy program update Francois Romieu
2006-12-04  0:03 ` [PATCH 4/5] r8169: more alignment for the 0x8168 Francois Romieu
2007-02-13  3:50   ` Philip Craig
2007-02-13  8:14     ` Francois Romieu
2007-02-13 23:32       ` Mike Isely
2007-02-23 23:13         ` Francois Romieu
2007-02-26  7:42           ` Philip Craig
2007-02-26 22:25             ` Stephen Hemminger [this message]
2007-02-28 21:48             ` Francois Romieu
2007-02-28 23:18               ` Francois Romieu
2007-02-13 23:56       ` Philip Craig
2006-12-04  0:14 ` [PATCH 5/5] r8169: teach yourself arithmetic in 21 days Francois Romieu
2006-12-07 10:07 ` [PATCH 0/5] Pull request for 'r8169-upstream-20061204-00' tag Jeff Garzik

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=20070226142528.6b68a0cb@freekitty \
    --to=shemminger@linux-foundation.org \
    --cc=isely@pobox.com \
    --cc=jeff@garzik.org \
    --cc=netdev@vger.kernel.org \
    --cc=philipc@snapgear.com \
    --cc=romieu@fr.zoreil.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.