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

From: Andi Kleen <[email-masked]>
Date: Tue, 13 Jan 2004 13:39:22 +0100

On Tue, Jan 13, 2004 at 07:28:50AM -0500, jamal wrote:
> The behavior of some 32 bit archs alignof()e.g ppc is similar in
> aligning to its biggest member. 
> We have some major problems with include/linux/pkt_sched.h::tc_stats for
> example; i just have to keep hacking tc on ppc everytime so it doesnt
> stop processing and bitch about truncated stats; [this happens when
> doing a sizeof() of on-the-wire data passed from the kernel being
> compared against sizeof(tc_stats)]. I recall there are a few other
> similar structures. It didnt seem like there was a clean solution when i
> last looked at this. It seems we may need surgery on a few places like
> this and may require a few #ifdefs. Any thoughts on this particular one?

I don't think it can be fixed with #ifdefs. For existing structures
we cannot change the layout because they are already enshrined in the ABI.
You have to translate them in the emulation layer somehow or just give up.
And for new ones just add all necessary padding explicitely or best avoid
__u64 (which causes most problems)

In fact we should have some watchdog enforcing these rules for all new
kernel submissions </dreaming>. In fact DaveM did that for some time,
but he unfortunately only enforced the rules needed for sparc64 which
are a subset of those needed by other ports.

-Andi