Hi Andrew,
(Please don't trim the cc.)
As I don't have the hardware, I would appreciate if you could test
the following quilt tree:http://www.kernel.org/pub/linux/kernel/people/penberg/patches/ipg/2.6.26...
[Note: in case you're not familiar with quilt, the patches need to
be applied in the order specified by the quilt 'series' file
included there.]You can enable 10KB jumbo frames either by passing:
ipg.jumbo=10k
to the kernel command line or, alternatively, load the ipg module
as follows:modprobe ipg jumbo=10k
You cannot enable or disable jumbo frame support once the module
is loaded so if you want to try out different frame sizes, you
first need to unload the module.Pekka
--
Hi Pekka,
Oh, my apologies. I'm not subscribed to the list, so I mailed only=20
Thanks for the advice. I installed quilt on my system and applied=20
Ok, but in practice I need to reboot the system: 1) usually I=20
compile into the kernel all code related to frequently used=20
hardware. 2) This is a remote system, so reload of network module=20
which is in use will be quite tricky.I tested it with both jumbo frames disabled (no options), and=20
enabled for 10k frames: ipg.jumbo=3D10k. It seems to work fine with=20
all acceptable MTUs (max MTU =3D=3D 10240).Sincerely yours,
Andrew
On Fri, 20 Jun 2008 14:12:51 +0300
The code should enable/disable anything it needs based on the MTU size
in the change_mtu call. If the driver needs to reallocate buffers, change receiver
settings, make sacrifices to deities, or phone home that is the place to do it.
In other words no compile or config option fro MTU settings please.
--
Right, so how about something like this instead? Andrew, can you test the
following patch? You need all the other patches from the previous series
modulo the last patch. Thanks!Pekka
Subject: [PATCH] ipg: run-time configurable jumbo frame support
From: Pekka Enberg <penberg@cs.helsinki.fi>Make jumbo frame support configurable via ifconfig mtu option as suggested by
Stephen Hemminger.Cc: Stephen Hemminger <stephen.hemminger@vyatta.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
---
drivers/net/ipg.c | 42 ++++++++++++++++++++------
drivers/net/ipg.h | 85 ------------------------------------------------------
2 files changed, 32 insertions(+), 95 deletions(-)Index: linux-2.6/drivers/net/ipg.c
===================================================================
--- linux-2.6.orig/drivers/net/ipg.c 2008-06-22 11:55:53.000000000 +0300
+++ linux-2.6/drivers/net/ipg.c 2008-06-22 12:15:45.000000000 +0300
@@ -42,7 +42,6 @@
#define ipg_r16(reg) ioread16(ioaddr + (reg))
#define ipg_r8(reg) ioread8(ioaddr + (reg))-#define JUMBO_FRAME_4k_ONLY
enum {
netdev_io_size = 128
};
@@ -55,6 +54,14 @@
MODULE_LICENSE("GPL");/*
+ * Defaults
+ */
+#define IPG_MAX_RXFRAME_SIZE 0x0600
+#define IPG_RXFRAG_SIZE 0x0600
+#define IPG_RXSUPPORT_SIZE 0x0600
+#define IPG_IS_JUMBO false
+
+/*
* Variable record -- index by leading revision/length
* Revision/Length(=N*4), Address1, Data1, Address2, Data2,...,AddressN,DataN
*/
@@ -1805,9 +1812,6 @@
sp->jumbo.current_size = 0;
sp->jumbo.skb = NULL;- if (IPG_TXFRAG_SIZE)
- dev->mtu = IPG_TXFRAG_SIZE;
-
/* Enable transmit and receive operation of the IPG. */
ipg_w32((ipg_r32(MAC_CTRL) | IPG_MC_RX_ENABLE | IPG_MC_TX_ENABLE) &
IPG_MC_RSVD_MASK, MAC_CTRL);
@@ -2116,6 +2120,7 @@
static int ipg_nic_change_mtu(struct net_device *dev, int new_mtu)
{
struct ipg_nic_private *sp = netdev_priv(dev);
+ int err;/* Function to accomodate changes to M...
Hi,
Ok, I replaced old ipg-make-jumbo-frame-support-configurable with=20
newer version. It works fine, I tuned MTU in the range from 68 to=20
10240 bytes )).Thanks for the patch, awaiting for it in the main kernel tree.
Sincerely yours,
Andrew
