From: Francois Romieu <romieu@fr.zoreil.com>
To: akpm@osdl.org
Cc: netdev@oss.sgi.com, jgarzik@pobox.com,
Dorn Hetzel <kernel@dorn.hetzel.org>
Subject: [patch 4/5] r8169: reduce max MTU for large frames
Date: Tue, 7 Dec 2004 01:17:22 +0100 [thread overview]
Message-ID: <20041207001722.GC18672@electric-eye.fr.zoreil.com> (raw)
In-Reply-To: <20041207001621.GB18672@electric-eye.fr.zoreil.com>
The device does not support the whole mtu range it claims. Experimenting
with the Tx threshold and/or the PCI burst size does not seem to improve
the behavior.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
diff -puN drivers/net/r8169.c~r8169-265 drivers/net/r8169.c
--- linux-2.6.10-rc2/drivers/net/r8169.c~r8169-265 2004-12-05 22:36:25.000000000 +0100
+++ linux-2.6.10-rc2-fr/drivers/net/r8169.c 2004-12-07 00:54:48.313082500 +0100
@@ -112,7 +112,8 @@ static int multicast_filter_limit = 32;
#define RX_DMA_BURST 6 /* Maximum PCI burst, '6' is 1024 */
#define TX_DMA_BURST 6 /* Maximum PCI burst, '6' is 1024 */
#define EarlyTxThld 0x3F /* 0x3F means NO early transmit */
-#define RxPacketMaxSize 0x3FE8 /* 16K - 1 - ETH_HLEN - VLAN - CRC */
+#define RxPacketMaxSize 0x3FE8 /* 16K - 1 - ETH_HLEN - VLAN - CRC... */
+#define SafeMtu 0x1c20 /* ... actually life sucks beyond ~7k */
#define InterFrameGap 0x03 /* 3 means InterFrameGap = the shortest one */
#define R8169_REGS_SIZE 256
@@ -1592,9 +1593,9 @@ static int rtl8169_change_mtu(struct net
struct rtl8169_private *tp = netdev_priv(dev);
int ret = 0;
- if (new_mtu < ETH_ZLEN || new_mtu > RxPacketMaxSize)
+ if (new_mtu < ETH_ZLEN || new_mtu > SafeMtu)
return -EINVAL;
-
+
dev->mtu = new_mtu;
if (!netif_running(dev))
_
next prev parent reply other threads:[~2004-12-07 0:17 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20041119162920.GA26836@lilah.hetzel.org>
[not found] ` <20041119201203.GA13522@electric-eye.fr.zoreil.com>
[not found] ` <20041120003754.GA32133@lilah.hetzel.org>
2004-11-20 0:29 ` r8169.c Francois Romieu
[not found] ` <20041120002946.GA18059@electric-eye.fr.zoreil.com>
2004-11-22 18:13 ` r8169.c Dorn Hetzel
2004-11-23 14:49 ` r8169.c Dorn Hetzel
2004-11-23 19:47 ` r8169.c Francois Romieu
2004-11-25 20:00 ` r8169.c Dorn Hetzel
2004-11-25 22:02 ` r8169.c Dorn Hetzel
2004-11-25 20:54 ` r8169.c Francois Romieu
2004-11-26 0:36 ` r8169.c Dorn Hetzel
2004-12-05 23:55 ` r8169.c Dorn Hetzel
2004-12-05 23:37 ` r8169.c Francois Romieu
2004-12-07 0:14 ` [patch 1/5] r8169: missing netif_poll_enable and irq ack Francois Romieu
2004-12-07 0:15 ` [patch 2/5] r8169: C 101 Francois Romieu
2004-12-07 0:16 ` [patch 3/5] r8169: Large Send enablement Francois Romieu
2004-12-07 0:17 ` Francois Romieu [this message]
2004-12-07 0:22 ` [patch 5/5] r8169: oversized driver field for ethtool Francois Romieu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20041207001722.GC18672@electric-eye.fr.zoreil.com \
--to=romieu@fr.zoreil.com \
--cc=akpm@osdl.org \
--cc=jgarzik@pobox.com \
--cc=kernel@dorn.hetzel.org \
--cc=netdev@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).