Re: [BRIDGE] Unaligned access on IA64 when comparing ethernet addresses

2007-04-19 Thread Eric Dumazet
David Miller a écrit : From: Eric Dumazet <[EMAIL PROTECTED]> Date: Thu, 19 Apr 2007 16:14:23 +0200 On Wed, 18 Apr 2007 13:04:22 -0700 (PDT) David Miller <[EMAIL PROTECTED]> wrote: Although I don't think gcc does anything fancy since we don't use memcmp(). It's a tradeoff, we'd like to use u

Re: [BRIDGE] Unaligned access on IA64 when comparing ethernet addresses

2007-04-19 Thread David Miller
From: Eric Dumazet <[EMAIL PROTECTED]> Date: Thu, 19 Apr 2007 16:14:23 +0200 > On Wed, 18 Apr 2007 13:04:22 -0700 (PDT) > David Miller <[EMAIL PROTECTED]> wrote: > > > > > Although I don't think gcc does anything fancy since we don't > > use memcmp(). It's a tradeoff, we'd like to use unsigned

Re: [BRIDGE] Unaligned access on IA64 when comparing ethernet addresses

2007-04-19 Thread Stephen Hemminger
On Thu, 19 Apr 2007 16:14:23 +0200 Eric Dumazet <[EMAIL PROTECTED]> wrote: > On Wed, 18 Apr 2007 13:04:22 -0700 (PDT) > David Miller <[EMAIL PROTECTED]> wrote: > > > > > Although I don't think gcc does anything fancy since we don't > > use memcmp(). It's a tradeoff, we'd like to use unsigned lo

Re: [BRIDGE] Unaligned access on IA64 when comparing ethernet addresses

2007-04-19 Thread Eric Dumazet
On Wed, 18 Apr 2007 13:04:22 -0700 (PDT) David Miller <[EMAIL PROTECTED]> wrote: > > Although I don't think gcc does anything fancy since we don't > use memcmp(). It's a tradeoff, we'd like to use unsigned long > comparisons when both objects are aligned correctly but we also > don't want it to

Re: [BRIDGE] Unaligned access on IA64 when comparing ethernet addresses

2007-04-18 Thread David Miller
From: Stephen Hemminger <[EMAIL PROTECTED]> Date: Wed, 18 Apr 2007 07:44:39 -0700 > On Wed, 18 Apr 2007 01:28:04 -0700 (PDT) > David Miller <[EMAIL PROTECTED]> wrote: > > > From: Pavel Emelianov <[EMAIL PROTECTED]> > > Date: Wed, 18 Apr 2007 10:43:56 +0400 > > > > > [snip] > > > > > > > --- lin

Re: [BRIDGE] Unaligned access on IA64 when comparing ethernet addresses

2007-04-18 Thread Stephen Hemminger
On Wed, 18 Apr 2007 01:28:04 -0700 (PDT) David Miller <[EMAIL PROTECTED]> wrote: > From: Pavel Emelianov <[EMAIL PROTECTED]> > Date: Wed, 18 Apr 2007 10:43:56 +0400 > > > [snip] > > > > > --- linux-2.6.orig/net/bridge/br_private.h2007-04-17 > > > 13:26:48.0 -0700 +++ linux-2.6/ne

Re: [BRIDGE] Unaligned access on IA64 when comparing ethernet addresses

2007-04-18 Thread Pavel Emelianov
David Miller wrote: > From: Pavel Emelianov <[EMAIL PROTECTED]> > Date: Wed, 18 Apr 2007 10:43:56 +0400 > >> [snip] >> >>> --- linux-2.6.orig/net/bridge/br_private.h 2007-04-17 >>> 13:26:48.0 -0700 +++ linux-2.6/net/bridge/br_private.h >>> 2007-04-17 13:30:29.0 -0700 @@ -36,7 +36,

Re: [BRIDGE] Unaligned access on IA64 when comparing ethernet addresses

2007-04-18 Thread David Miller
From: Pavel Emelianov <[EMAIL PROTECTED]> Date: Wed, 18 Apr 2007 10:43:56 +0400 > [snip] > > > --- linux-2.6.orig/net/bridge/br_private.h 2007-04-17 > > 13:26:48.0 -0700 +++ linux-2.6/net/bridge/br_private.h > > 2007-04-17 13:30:29.0 -0700 @@ -36,7 +36,7 @@ > > { > > unsigne

Re: [BRIDGE] Unaligned access on IA64 when comparing ethernet addresses

2007-04-17 Thread Pavel Emelianov
[snip] > --- linux-2.6.orig/net/bridge/br_private.h2007-04-17 > 13:26:48.0 -0700 +++ linux-2.6/net/bridge/br_private.h > 2007-04-17 13:30:29.0 -0700 @@ -36,7 +36,7 @@ > { > unsigned char prio[2]; > unsigned char addr[6]; > -}; > +} __attribute__((aligned(8)));

Re: [BRIDGE] Unaligned access on IA64 when comparing ethernet addresses

2007-04-17 Thread David Miller
From: Eric Dumazet <[EMAIL PROTECTED]> Date: Tue, 17 Apr 2007 23:24:36 +0200 > I suspect you missed part of Stephen patch : > > (maybe some mailer problem...) My bad, sorry :( I pushed the other version of the fix to Linus just now. I'll put Stephen's version in if he sends me a fixup relative

Re: [BRIDGE] Unaligned access on IA64 when comparing ethernet addresses

2007-04-17 Thread Eric Dumazet
David Miller a écrit : From: Stephen Hemminger <[EMAIL PROTECTED]> Date: Tue, 17 Apr 2007 13:37:23 -0700 The previous patch relied on the bridge id being aligned by the compiler (which happens as a side effect). So please use this instead. compare_ether_addr() implicitly requires that the addr

Re: [BRIDGE] Unaligned access on IA64 when comparing ethernet addresses

2007-04-17 Thread David Miller
From: Stephen Hemminger <[EMAIL PROTECTED]> Date: Tue, 17 Apr 2007 13:37:23 -0700 > The previous patch relied on the bridge id being aligned by > the compiler (which happens as a side effect). So please use > this instead. > > compare_ether_addr() implicitly requires that the addresses > passed a

Re: [BRIDGE] Unaligned access on IA64 when comparing ethernet addresses

2007-04-17 Thread Stephen Hemminger
The previous patch relied on the bridge id being aligned by the compiler (which happens as a side effect). So please use this instead. compare_ether_addr() implicitly requires that the addresses passed are 2-bytes aligned in memory. This is not true for br_stp_change_bridge_id() and br_stp_recalc

Re: [BRIDGE] Unaligned access on IA64 when comparing ethernet addresses

2007-04-17 Thread David Miller
From: Stephen Hemminger <[EMAIL PROTECTED]> Date: Tue, 17 Apr 2007 12:55:41 -0700 > David Miller wrote: > > From: Pavel Emelianov <[EMAIL PROTECTED]> > > Date: Tue, 17 Apr 2007 15:49:30 +0400 > > > > > >> From: Evgeny Kravtsunov <[EMAIL PROTECTED]> > >> > >> compare_ether_addr() implicitly requ

Re: [BRIDGE] Unaligned access on IA64 when comparing ethernet addresses

2007-04-17 Thread Stephen Hemminger
David Miller wrote: From: Pavel Emelianov <[EMAIL PROTECTED]> Date: Tue, 17 Apr 2007 15:49:30 +0400 From: Evgeny Kravtsunov <[EMAIL PROTECTED]> compare_ether_addr() implicitly requires that the addresses passed are 2-bytes aligned in memory. This is not true for br_stp_change_bridge_id() a

Re: [BRIDGE] Unaligned access on IA64 when comparing ethernet addresses

2007-04-17 Thread David Miller
From: Pavel Emelianov <[EMAIL PROTECTED]> Date: Tue, 17 Apr 2007 15:49:30 +0400 > From: Evgeny Kravtsunov <[EMAIL PROTECTED]> > > compare_ether_addr() implicitly requires that the addresses > passed are 2-bytes aligned in memory. > > This is not true for br_stp_change_bridge_id() and > br_stp_re

[BRIDGE] Unaligned access on IA64 when comparing ethernet addresses

2007-04-17 Thread Pavel Emelianov
From: Evgeny Kravtsunov <[EMAIL PROTECTED]> compare_ether_addr() implicitly requires that the addresses passed are 2-bytes aligned in memory. This is not true for br_stp_change_bridge_id() and br_stp_recalculate_bridge_id() in which one of the addresses is unsigned char *, and thus may not be 2-b