linux-mips
[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 <alan@lxorguk.ukuu.org.uk>
Date: 05 Sep 2002 00:34:21 +0100
Cc: linux-mips@linux-mips.org
In-reply-to: <3D765072.60208@Lineo.COM>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <3D765072.60208@Lineo.COM>
Sender: linux-mips-bounce@linux-mips.org
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>