Allow to control LRO

Use a module parameter to control whether LRO is enabled or disabled.
This is required when the host is configured as a router, in which
case using LRO would cause IP packets to be forwarded with wrong
TCP checksum. 

Signed-off-by: Eli Cohen <[EMAIL PROTECTED]>

---

Index: ofa_1_3_dev_kernel/drivers/infiniband/ulp/ipoib/ipoib_ib.c
===================================================================
--- ofa_1_3_dev_kernel.orig/drivers/infiniband/ulp/ipoib/ipoib_ib.c     
2007-10-14 12:10:17.000000000 +0200
+++ ofa_1_3_dev_kernel/drivers/infiniband/ulp/ipoib/ipoib_ib.c  2007-10-14 
12:34:16.000000000 +0200
@@ -52,6 +52,10 @@ MODULE_PARM_DESC(data_debug_level,
                 "Enable data path debug tracing if > 0");
 #endif
 
+static int lro_enabled = 1;
+module_param(lro_enabled, int, 0644);
+MODULE_PARM_DESC(lro_enabled, "Enable LRO when > 1");
+
 static DEFINE_MUTEX(pkey_mutex);
 
 struct ipoib_ah *ipoib_create_ah(struct net_device *dev,
@@ -245,7 +249,7 @@ static void ipoib_ib_handle_rx_wc(struct
                   checksum offload I put it here */
                if ((((struct iphdr *)(skb->data))->ihl) == 5) {
                        skb->ip_summed = CHECKSUM_UNNECESSARY;
-                       if (!ipoib_lro_rx(priv, skb))
+                       if (lro_enabled && !ipoib_lro_rx(priv, skb))
                                goto repost;
                }
        }

_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to