[Top] [All Lists]

Re: [bonding] Add basic support for dynamic configuration of bond interf

To: hadi@xxxxxxxxxx
Subject: Re: [bonding] Add basic support for dynamic configuration of bond interfaces
From: Andi Kleen <ak@xxxxxxx>
Date: Mon, 12 Jan 2004 16:04:46 +0100
Cc: jgarzik@xxxxxxxxx, greearb@xxxxxxxxxxxxxxx, amir.noam@xxxxxxxxx, bonding-devel@xxxxxxxxxxxxxxxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <1073915461.1118.342.camel@jzny.localdomain>
References: <> <> <> <> <> <> <1073915461.1118.342.camel@jzny.localdomain>
Sender: netdev-bounce@xxxxxxxxxxx
On 12 Jan 2004 08:51:02 -0500
jamal <hadi@xxxxxxxxxx> wrote:

> Andi,
> Can you point to specifics that break 64 bit emulation so we can avoid
> them?
> I have to admit the pf_key interaction is relatively unorthrodox but
> looked fine.

Ok, here are the full rules: 


long/void * are disallowed
use [su]{16,32,64} instead

Non obvious problems specific to IA64 and x86-64 (they don't happen on 
that is why they were often not catched earlier):

When you use [su]64: 

make sure the data element is explicitely padded to be on a 8 byte boundary
in the structure. The reason is that alignof(u64) on i386 is 4 but 8 on 
and the structure layout could change.

also when you use 64bit types make sure the complete structure is padded to 8 
The x86-64 ABI pads any data structure to the alignof() of its biggest member
to get good alignment for arrays. This is what broke PF_KEY - it is missing this
padding and the structure layout ends up differently with nested structures.

> What are the things you will perform surgery on?

I'm not sure I will because it is too ugly. Or at least I haven't found a nice 
way for it yet. Currently you just cannot use ipsec from 32bit executables, you 
have to use 


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