[openib-general] [IPoIB] Add support for MTU module parameter

Hal Rosenstock halr at voltaire.com
Thu Jun 16 05:40:19 PDT 2005


[IPoIB] Add support for MTU module parameter. This is so there can be a
non default MTU at boot up if the administrator so desires (prior to
being able to invoke ifconfig).

Signed-off-by: Hal Rosenstock <halr at voltaire.com>

Index: ipoib_main.c
===================================================================
--- ipoib_main.c        (revision 2631)
+++ ipoib_main.c        (working copy)
@@ -58,6 +58,10 @@
 MODULE_PARM_DESC(debug_level, "Enable debug tracing if > 0");
 #endif
 
+static unsigned int mtu = IPOIB_PACKET_SIZE - IPOIB_ENCAP_LEN;
+module_param(mtu, int, 0);
+MODULE_PARM_DESC(mtu, "Override the default MTU value of 2044.");
+
 static const u8 ipv4_bcast_addr[] = {
        0x00, 0xff, 0xff, 0xff,
        0xff, 0x12, 0x40, 0x1b, 0x00, 0x00, 0x00, 0x00,
@@ -824,7 +828,7 @@
        dev->features            = NETIF_F_VLAN_CHALLENGED | NETIF_F_LLTX;
 
        /* MTU will be reset when mcast join happens */
-       dev->mtu                 = IPOIB_PACKET_SIZE - IPOIB_ENCAP_LEN;
+       dev->mtu                 = mtu;
        priv->mcast_mtu          = priv->admin_mtu = dev->mtu;
 
        memcpy(dev->broadcast, ipv4_bcast_addr, INFINIBAND_ALEN);





More information about the general mailing list