Received: (from majordomo@localhost) by oss.sgi.com (8.11.3/8.11.3) id f549ZGD27043 for netdev-outgoing; Mon, 4 Jun 2001 02:35:16 -0700 Received: from colorfullife.com (colorfullife.com [216.156.138.34]) by oss.sgi.com (8.11.3/8.11.3) with SMTP id f549ZFh27039 for ; Mon, 4 Jun 2001 02:35:15 -0700 Received: from dbl.localdomain (localhost [127.0.0.1]) by colorfullife.com (8.11.2/8.11.2) with ESMTP id f549bjq23817; Mon, 4 Jun 2001 05:37:49 -0400 Received: from colorfullife.com (IDENT:manfred@clmsdev.localdomain [172.17.4.1]) by dbl.localdomain (8.11.2/8.11.2) with ESMTP id f549ZAv12891; Mon, 4 Jun 2001 11:35:10 +0200 Message-ID: <3B1B564E.D83A741A@colorfullife.com> Date: Mon, 04 Jun 2001 11:35:10 +0200 From: Manfred Spraul X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.5-ac6 i686) X-Accept-Language: en, de MIME-Version: 1.0 To: "David S. Miller" CC: linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Re: multicast hash incorrect on big endian archs References: <3B1A9558.2DBAECE7@colorfullife.com> <15130.61778.471925.245018@pizda.ninka.net> <3B1B3268.2A02D2C@colorfullife.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-netdev@oss.sgi.com Precedence: bulk Content-Length: 885 Lines: 31 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 , overridable with __HAVE_ARCH_SET_BIT_n? Default implementation for the nonatomic __set_bit could be added into , too. Btw, the correct name would be __set_bit_n: the function don't guarantee atomicity. -- Manfred