From: Jon Mason <jdmason@us.ibm.com>
To: Francois Romieu <romieu@fr.zoreil.com>
Cc: netdev@oss.sgi.com
Subject: [PATCH 1/2] r8169: Jumbo Frames mini-increase
Date: Mon, 28 Feb 2005 11:27:53 -0600 [thread overview]
Message-ID: <20050228172753.GA13280@us.ibm.com> (raw)
In-Reply-To: <20050227235210.GA27271@electric-eye.fr.zoreil.com>
This patch increases the maximum MTU from ~7k to 8169 (the maximum MTU
that will fit into a single descriptor).
Applies cleanly to linux-2.6.11-rc4-mm1 and tested on amd64
Signed-off-by: Jon Mason <jdmason@us.ibm.com>
--- drivers/net/r8169.c.orig 2005-02-26 12:38:54.000000000 -0600
+++ drivers/net/r8169.c 2005-02-27 11:10:19.000000000 -0600
@@ -117,8 +117,9 @@ 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 LargeSendETT 0x35
#define RxPacketMaxSize 0x3FE8 /* 16K - 1 - ETH_HLEN - VLAN - CRC... */
-#define SafeMtu 0x1c20 /* ... actually life sucks beyond ~7k */
+#define SafeMtu 0x1FE9 /* Largest MTU that can fit in a single desc */
#define InterFrameGap 0x03 /* 3 means InterFrameGap = the shortest one */
#define R8169_REGS_SIZE 256
@@ -1576,8 +1577,12 @@ rtl8169_hw_start(struct net_device *dev)
RTL_W8(Cfg9346, Cfg9346_Unlock);
RTL_W8(ChipCmd, CmdTxEnb | CmdRxEnb);
- RTL_W8(EarlyTxThres, EarlyTxThld);
+ if (dev->mtu < 7400)
+ RTL_W8(EarlyTxThres, EarlyTxThld);
+ else
+ RTL_W8(EarlyTxThres, LargeSendETT);
+
/* For gigabit rtl8169, MTU + header + CRC + VLAN */
RTL_W16(RxMaxSize, tp->rx_buf_sz);
next prev parent reply other threads:[~2005-02-28 17:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-26 17:11 [PATCH]: r8169: Message level support Richard Dawe
2005-02-26 20:35 ` Francois Romieu
2005-02-26 21:20 ` Jeff Garzik
2005-02-27 22:43 ` Richard Dawe
2005-02-27 23:52 ` Francois Romieu
2005-02-28 17:27 ` Jon Mason [this message]
2005-02-28 19:32 ` [PATCH 1/2] r8169: Jumbo Frames mini-increase Francois Romieu
2005-02-28 19:41 ` Jon Mason
2005-02-28 20:19 ` Jeff Garzik
2005-02-28 20:56 ` Jon Mason
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=20050228172753.GA13280@us.ibm.com \
--to=jdmason@us.ibm.com \
--cc=netdev@oss.sgi.com \
--cc=romieu@fr.zoreil.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).