From: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
To: axp-list@redhat.com
Subject: Re: Kernel unaligned accesses
Date: Tue, 11 Dec 2001 14:01:37 +0300 [thread overview]
Message-ID: <20011211140137.A7087@jurassic.park.msu.ru> (raw)
In-Reply-To: <20011210204949.51405.qmail@web11208.mail.yahoo.com>; from tomdropka@yahoo.com on Mon, Dec 10, 2001 at 12:49:49PM -0800
On Mon, Dec 10, 2001 at 12:49:49PM -0800, Tom Dropka wrote:
> BTW, I saw the same unaligned accesses with the stock RH 2.4.3-12
> kernel, which is why I tried 2.4.16.
If you have the driver compiled as module (which is probably the
case for stock RH kernel), you can try to fix it even without
recompiling - pass "rx_copybreak=1518" option to the module.
Or try appended patch.
> > Don Becker's drivers, when "adjusted" for Alpha, force a copy of the
> > data from the "raw" buffer to another buffer where the data will be
> > appropriately aligned, thus avoiding any unaligned accesses at the
> > price of the packet copy.
Yes - it's a common problem on alpha and several other platforms
with network cards capable to DMA only on a 32-bit boundary (via-rhine
is one of those). Without copying the packet to another buffer IP header
will be misaligned, and you'll have tons of unaligned traps in the
TCP/IP layer.
Ivan.
--- linux/drivers/net/via-rhine.c.orig Sat Nov 10 00:45:36 2001
+++ linux/drivers/net/via-rhine.c Tue Dec 11 13:11:33 2001
@@ -87,7 +87,12 @@ static int max_interrupt_work = 20;
/* Set the copy breakpoint for the copy-only-tiny-frames scheme.
Setting to > 1518 effectively disables this feature. */
-static int rx_copybreak;
+#if defined(__alpha__) || defined(__sparc__) || defined(__mips__) || \
+ defined(__arm__)
+static int rx_copybreak = 1518;
+#else
+static int rx_copybreak = 200;
+#endif
/* Used to pass the media type, etc.
Both 'options[]' and 'full_duplex[]' should exist for driver
next prev parent reply other threads:[~2001-12-11 11:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-10 19:45 Kernel unaligned accesses Tom Dropka
2001-12-10 20:11 ` Jay Estabrook
2001-12-10 20:49 ` Tom Dropka
2001-12-11 11:01 ` Ivan Kokshaysky [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-12-11 13:57 Tom Dropka
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox