netdev
[Top] [All Lists]

Re: [BUG] alignment problem in net/core/flow.c:flow_key_compare

To: YOSHIFUJI Hideaki / ____________ <yoshfuji@xxxxxxxxxxxxxx>
Subject: Re: [BUG] alignment problem in net/core/flow.c:flow_key_compare
From: Andrew Morton <akpm@xxxxxxxx>
Date: Thu, 18 Mar 2004 18:59:40 -0800
Cc: davem@xxxxxxxxxx, netdev@xxxxxxxxxxx, mru@xxxxxx
In-reply-to: <20040319.115511.32395995.yoshfuji@xxxxxxxxxxxxxx>
References: <20040318162903.59192d13.akpm@xxxxxxxx> <20040319.115511.32395995.yoshfuji@xxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
YOSHIFUJI Hideaki / ____________ <yoshfuji@xxxxxxxxxxxxxx> wrote:
>
>  
>  +#if (BITS_PER_LONG == 64)
>  +#define FLOWI_ALIGN_BYTES 8
>  +#else
>  +#define FLOWI_ALIGN_BYTES 4
>  +#endif
>  +
>   struct flowi {
>       int     oif;
>       int     iif;
>  @@ -77,7 +83,7 @@
>   #define fl_icmp_type        uli_u.icmpt.type
>   #define fl_icmp_code        uli_u.icmpt.code
>   #define fl_ipsec_spi        uli_u.spi
>  -};
>  +} __attribute__((__aligned__(FLOWI_ALIGN_BYTES)));
>  

Why not simply

>  +} __attribute__((__aligned__(BITS_PER_LONG/8)));

?


<Prev in Thread] Current Thread [Next in Thread>