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 long

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 long

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

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

2007-04-18 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))); Why 8?

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 @@ { unsigned char

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,7 @@ {

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 +++

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] ---

[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

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

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() and

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 requires that the addresses

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

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 are

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

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 to