[Top] [All Lists]

Re: patch to kaweth.c to align IP header

To: Quinn Jensen <jensenq@Lineo.COM>
Subject: Re: patch to kaweth.c to align IP header
From: Alan Cox <>
Date: 05 Sep 2002 00:34:21 +0100
In-reply-to: <3D765072.60208@Lineo.COM>
Original-recipient: rfc822;
References: <3D765072.60208@Lineo.COM>
On Wed, 2002-09-04 at 19:26, Quinn Jensen wrote:
> All,
> The Kawasaki LSI USB Ethernet driver was causing a crash
> in ipt_do_table() on mips because the address fields in
> the IP header were not word aligned.  Many (all?) other

You -must- handle alignment traps in the kernel for networking. The
network code assumes and relies on this property and there are plenty of
other ways to get misaligned datagrams through things like ip in ip.

> ethernet drivers do an skb_reserve of 2 to word align
> the address fields, and doing this in kaweth.c fixed
> my crash.

Its not the crash fix, its however right in the sense its a good
performance optimisation for most platforms

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