public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Manfred Spraul <manfred@colorfullife.com>
To: "David S. Miller" <davem@redhat.com>
Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com
Subject: Re: multicast hash incorrect on big endian archs
Date: Mon, 04 Jun 2001 11:35:10 +0200	[thread overview]
Message-ID: <3B1B564E.D83A741A@colorfullife.com> (raw)
In-Reply-To: <3B1A9558.2DBAECE7@colorfullife.com> <15130.61778.471925.245018@pizda.ninka.net> <3B1B3268.2A02D2C@colorfullife.com>

Manfred Spraul wrote:
> 
> "David S. Miller" wrote:
> >
> > Many big-endian systems already need to provide little-endian bitops,
> > for ext2's sake for example.
> >
> > We should formalize this, with {set,clear,change,test}_le_bit which
> > technically every port has implemented in some for or another already.
> >

That could cause alignment problems.
<<< from starfire.c
{
     long filter_addr;
     u16 mc_filter[32] __attribute__ ((aligned(sizeof(long)))); 
<<<
set_bit requires word alignment, but without the __attibute__ the
compiler would only guarantee 16-bit alignment. IMHO ugly.

Should I add __set_bit_{8,16,32} into <linux/bitops.h>, overridable with
__HAVE_ARCH_SET_BIT_n?

Default implementation for the nonatomic __set_bit could be added into
<linux/bitops.h>, too.

Btw, the correct name would be __set_bit_n: the function don't guarantee
atomicity.

--
	Manfred

  reply	other threads:[~2001-06-04 10:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-03 19:51 multicast hash incorrect on big endian archs Manfred Spraul
2001-06-04  2:24 ` David S. Miller
2001-06-04  7:02   ` Manfred Spraul
2001-06-04  9:35     ` Manfred Spraul [this message]
2001-06-04 10:54       ` David S. Miller

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=3B1B564E.D83A741A@colorfullife.com \
    --to=manfred@colorfullife.com \
    --cc=davem@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --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