[ewg] [PATCH] backports: fix csum_tcpudp_nofold backport for ia64
Yossi Etigin
yosefe at Voltaire.COM
Thu Sep 25 11:35:26 PDT 2008
On ia64, csum_tcpudp_nofold() is not an inline function as on other
platforms. It's a function that isn't exported until 2.6.23. ib_ipoib
uses it, thus and fails to load. We redefine this function in the
backport, if the platform is ia64.
Fixes bug #1191.
Signed-off-by: Yossi Etigin <yosefe at voltaire.com>
--
diff -urN a/kernel_patches/backport/2.6.16/ipoib_lro_to_2.6.23.patch b/kernel_patches/backport/2.6.16/ipoib_lro_to_2.6.23.patch
--- a/kernel_patches/backport/2.6.16/ipoib_lro_to_2.6.23.patch 2008-09-24 21:26:45.000000000 +0300
+++ b/kernel_patches/backport/2.6.16/ipoib_lro_to_2.6.23.patch 2008-09-25 20:41:16.000000000 +0300
@@ -1,13 +1,13 @@
---
drivers/infiniband/ulp/ipoib/Makefile | 3
- drivers/infiniband/ulp/ipoib/inet_lro.c | 602 +++++++++++++++++++++++++++
+ drivers/infiniband/ulp/ipoib/inet_lro.c | 625 +++++++++++++++++++++++++++
drivers/infiniband/ulp/ipoib/ipoib_ethtool.c | 13
- 3 files changed, 607 insertions(+), 11 deletions(-)
+ 3 files changed, 630 insertions(+), 11 deletions(-)
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile
===================================================================
---- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/Makefile
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile
+--- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/Makefile 2008-09-24 21:36:07.000000000 +0300
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile 2008-09-24 21:36:49.000000000 +0300
@@ -5,7 +5,8 @@ ib_ipoib-y := ipoib_main.o \
ipoib_multicast.o \
ipoib_verbs.o \
@@ -20,9 +20,9 @@
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c
===================================================================
---- /dev/null
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c
-@@ -0,0 +1,602 @@
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c 2008-09-24 21:56:31.000000000 +0300
+@@ -0,0 +1,625 @@
+/*
+ * linux/net/ipv4/inet_lro.c
+ *
@@ -154,6 +154,29 @@
+ lro_desc->data_csum);
+}
+
++#ifdef __ia64__
++static unsigned int
++static_csum_tcpudp_nofold (unsigned long saddr, unsigned long daddr, unsigned short len,
++ unsigned short proto, unsigned int sum)
++{
++ unsigned long result;
++
++ result = (saddr + daddr + sum +
++ ((unsigned long) ntohs(len) << 16) +
++ ((unsigned long) proto << 8));
++
++ /* Fold down to 32-bits so we don't lose in the typedef-less network stack. */
++ /* 64 to 33 */
++ result = (result & 0xffffffff) + (result >> 32);
++ /* 33 to 32 */
++ result = (result & 0xffffffff) + (result >> 32);
++ return result;
++}
++#define CSUM_TCPUDP_NOFOLD static_csum_tcpudp_nofold
++#else
++#define CSUM_TCPUDP_NOFOLD csum_tcpudp_nofold
++#endif
++
+static __wsum lro_tcp_data_csum(struct iphdr *iph, struct tcphdr *tcph, int len)
+{
+ __wsum tcp_csum;
@@ -163,7 +186,7 @@
+ tcp_csum = ~csum_unfold(tcph->check);
+ tcp_hdr_csum = csum_partial((u8 *)tcph, TCP_HDR_LEN(tcph), tcp_csum);
+
-+ tcp_ps_hdr_csum = csum_tcpudp_nofold(iph->saddr, iph->daddr,
++ tcp_ps_hdr_csum = CSUM_TCPUDP_NOFOLD(iph->saddr, iph->daddr,
+ len + TCP_HDR_LEN(tcph),
+ IPPROTO_TCP, 0);
+
@@ -627,8 +650,8 @@
+EXPORT_SYMBOL(lro_flush_pkt);
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
===================================================================
---- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
+--- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c 2008-09-24 21:36:07.000000000 +0300
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c 2008-09-24 21:36:49.000000000 +0300
@@ -100,14 +100,9 @@ static void ipoib_get_strings(struct net
}
}
diff -urN a/kernel_patches/backport/2.6.16_sles10/ipoib_lro_to_2.6.23.patch b/kernel_patches/backport/2.6.16_sles10/ipoib_lro_to_2.6.23.patch
--- a/kernel_patches/backport/2.6.16_sles10/ipoib_lro_to_2.6.23.patch 2008-09-24 21:26:45.000000000 +0300
+++ b/kernel_patches/backport/2.6.16_sles10/ipoib_lro_to_2.6.23.patch 2008-09-25 20:41:16.000000000 +0300
@@ -1,13 +1,13 @@
---
drivers/infiniband/ulp/ipoib/Makefile | 3
- drivers/infiniband/ulp/ipoib/inet_lro.c | 602 +++++++++++++++++++++++++++
+ drivers/infiniband/ulp/ipoib/inet_lro.c | 625 +++++++++++++++++++++++++++
drivers/infiniband/ulp/ipoib/ipoib_ethtool.c | 13
- 3 files changed, 607 insertions(+), 11 deletions(-)
+ 3 files changed, 630 insertions(+), 11 deletions(-)
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile
===================================================================
---- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/Makefile
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile
+--- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/Makefile 2008-09-24 21:36:07.000000000 +0300
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile 2008-09-24 21:36:49.000000000 +0300
@@ -5,7 +5,8 @@ ib_ipoib-y := ipoib_main.o \
ipoib_multicast.o \
ipoib_verbs.o \
@@ -20,9 +20,9 @@
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c
===================================================================
---- /dev/null
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c
-@@ -0,0 +1,602 @@
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c 2008-09-24 21:56:31.000000000 +0300
+@@ -0,0 +1,625 @@
+/*
+ * linux/net/ipv4/inet_lro.c
+ *
@@ -154,6 +154,29 @@
+ lro_desc->data_csum);
+}
+
++#ifdef __ia64__
++static unsigned int
++static_csum_tcpudp_nofold (unsigned long saddr, unsigned long daddr, unsigned short len,
++ unsigned short proto, unsigned int sum)
++{
++ unsigned long result;
++
++ result = (saddr + daddr + sum +
++ ((unsigned long) ntohs(len) << 16) +
++ ((unsigned long) proto << 8));
++
++ /* Fold down to 32-bits so we don't lose in the typedef-less network stack. */
++ /* 64 to 33 */
++ result = (result & 0xffffffff) + (result >> 32);
++ /* 33 to 32 */
++ result = (result & 0xffffffff) + (result >> 32);
++ return result;
++}
++#define CSUM_TCPUDP_NOFOLD static_csum_tcpudp_nofold
++#else
++#define CSUM_TCPUDP_NOFOLD csum_tcpudp_nofold
++#endif
++
+static __wsum lro_tcp_data_csum(struct iphdr *iph, struct tcphdr *tcph, int len)
+{
+ __wsum tcp_csum;
@@ -163,7 +186,7 @@
+ tcp_csum = ~csum_unfold(tcph->check);
+ tcp_hdr_csum = csum_partial((u8 *)tcph, TCP_HDR_LEN(tcph), tcp_csum);
+
-+ tcp_ps_hdr_csum = csum_tcpudp_nofold(iph->saddr, iph->daddr,
++ tcp_ps_hdr_csum = CSUM_TCPUDP_NOFOLD(iph->saddr, iph->daddr,
+ len + TCP_HDR_LEN(tcph),
+ IPPROTO_TCP, 0);
+
@@ -627,8 +650,8 @@
+EXPORT_SYMBOL(lro_flush_pkt);
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
===================================================================
---- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
+--- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c 2008-09-24 21:36:07.000000000 +0300
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c 2008-09-24 21:36:49.000000000 +0300
@@ -100,14 +100,9 @@ static void ipoib_get_strings(struct net
}
}
diff -urN a/kernel_patches/backport/2.6.16_sles10_sp1/ipoib_lro_to_2.6.23.patch b/kernel_patches/backport/2.6.16_sles10_sp1/ipoib_lro_to_2.6.23.patch
--- a/kernel_patches/backport/2.6.16_sles10_sp1/ipoib_lro_to_2.6.23.patch 2008-09-24 21:26:45.000000000 +0300
+++ b/kernel_patches/backport/2.6.16_sles10_sp1/ipoib_lro_to_2.6.23.patch 2008-09-25 20:41:16.000000000 +0300
@@ -1,13 +1,13 @@
---
drivers/infiniband/ulp/ipoib/Makefile | 3
- drivers/infiniband/ulp/ipoib/inet_lro.c | 602 +++++++++++++++++++++++++++
+ drivers/infiniband/ulp/ipoib/inet_lro.c | 625 +++++++++++++++++++++++++++
drivers/infiniband/ulp/ipoib/ipoib_ethtool.c | 13
- 3 files changed, 607 insertions(+), 11 deletions(-)
+ 3 files changed, 630 insertions(+), 11 deletions(-)
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile
===================================================================
---- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/Makefile
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile
+--- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/Makefile 2008-09-24 21:36:07.000000000 +0300
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile 2008-09-24 21:36:49.000000000 +0300
@@ -5,7 +5,8 @@ ib_ipoib-y := ipoib_main.o \
ipoib_multicast.o \
ipoib_verbs.o \
@@ -20,9 +20,9 @@
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c
===================================================================
---- /dev/null
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c
-@@ -0,0 +1,602 @@
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c 2008-09-24 21:56:31.000000000 +0300
+@@ -0,0 +1,625 @@
+/*
+ * linux/net/ipv4/inet_lro.c
+ *
@@ -154,6 +154,29 @@
+ lro_desc->data_csum);
+}
+
++#ifdef __ia64__
++static unsigned int
++static_csum_tcpudp_nofold (unsigned long saddr, unsigned long daddr, unsigned short len,
++ unsigned short proto, unsigned int sum)
++{
++ unsigned long result;
++
++ result = (saddr + daddr + sum +
++ ((unsigned long) ntohs(len) << 16) +
++ ((unsigned long) proto << 8));
++
++ /* Fold down to 32-bits so we don't lose in the typedef-less network stack. */
++ /* 64 to 33 */
++ result = (result & 0xffffffff) + (result >> 32);
++ /* 33 to 32 */
++ result = (result & 0xffffffff) + (result >> 32);
++ return result;
++}
++#define CSUM_TCPUDP_NOFOLD static_csum_tcpudp_nofold
++#else
++#define CSUM_TCPUDP_NOFOLD csum_tcpudp_nofold
++#endif
++
+static __wsum lro_tcp_data_csum(struct iphdr *iph, struct tcphdr *tcph, int len)
+{
+ __wsum tcp_csum;
@@ -163,7 +186,7 @@
+ tcp_csum = ~csum_unfold(tcph->check);
+ tcp_hdr_csum = csum_partial((u8 *)tcph, TCP_HDR_LEN(tcph), tcp_csum);
+
-+ tcp_ps_hdr_csum = csum_tcpudp_nofold(iph->saddr, iph->daddr,
++ tcp_ps_hdr_csum = CSUM_TCPUDP_NOFOLD(iph->saddr, iph->daddr,
+ len + TCP_HDR_LEN(tcph),
+ IPPROTO_TCP, 0);
+
@@ -627,8 +650,8 @@
+EXPORT_SYMBOL(lro_flush_pkt);
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
===================================================================
---- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
+--- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c 2008-09-24 21:36:07.000000000 +0300
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c 2008-09-24 21:36:49.000000000 +0300
@@ -100,14 +100,9 @@ static void ipoib_get_strings(struct net
}
}
diff -urN a/kernel_patches/backport/2.6.16_sles10_sp2/ipoib_lro_to_2.6.23.patch b/kernel_patches/backport/2.6.16_sles10_sp2/ipoib_lro_to_2.6.23.patch
--- a/kernel_patches/backport/2.6.16_sles10_sp2/ipoib_lro_to_2.6.23.patch 2008-09-24 21:26:45.000000000 +0300
+++ b/kernel_patches/backport/2.6.16_sles10_sp2/ipoib_lro_to_2.6.23.patch 2008-09-25 20:41:16.000000000 +0300
@@ -1,13 +1,13 @@
---
drivers/infiniband/ulp/ipoib/Makefile | 3
- drivers/infiniband/ulp/ipoib/inet_lro.c | 602 +++++++++++++++++++++++++++
+ drivers/infiniband/ulp/ipoib/inet_lro.c | 625 +++++++++++++++++++++++++++
drivers/infiniband/ulp/ipoib/ipoib_ethtool.c | 13
- 3 files changed, 607 insertions(+), 11 deletions(-)
+ 3 files changed, 630 insertions(+), 11 deletions(-)
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile
===================================================================
---- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/Makefile
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile
+--- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/Makefile 2008-09-24 21:36:07.000000000 +0300
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile 2008-09-24 21:36:49.000000000 +0300
@@ -5,7 +5,8 @@ ib_ipoib-y := ipoib_main.o \
ipoib_multicast.o \
ipoib_verbs.o \
@@ -20,9 +20,9 @@
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c
===================================================================
---- /dev/null
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c
-@@ -0,0 +1,602 @@
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c 2008-09-24 21:56:31.000000000 +0300
+@@ -0,0 +1,625 @@
+/*
+ * linux/net/ipv4/inet_lro.c
+ *
@@ -154,6 +154,29 @@
+ lro_desc->data_csum);
+}
+
++#ifdef __ia64__
++static unsigned int
++static_csum_tcpudp_nofold (unsigned long saddr, unsigned long daddr, unsigned short len,
++ unsigned short proto, unsigned int sum)
++{
++ unsigned long result;
++
++ result = (saddr + daddr + sum +
++ ((unsigned long) ntohs(len) << 16) +
++ ((unsigned long) proto << 8));
++
++ /* Fold down to 32-bits so we don't lose in the typedef-less network stack. */
++ /* 64 to 33 */
++ result = (result & 0xffffffff) + (result >> 32);
++ /* 33 to 32 */
++ result = (result & 0xffffffff) + (result >> 32);
++ return result;
++}
++#define CSUM_TCPUDP_NOFOLD static_csum_tcpudp_nofold
++#else
++#define CSUM_TCPUDP_NOFOLD csum_tcpudp_nofold
++#endif
++
+static __wsum lro_tcp_data_csum(struct iphdr *iph, struct tcphdr *tcph, int len)
+{
+ __wsum tcp_csum;
@@ -163,7 +186,7 @@
+ tcp_csum = ~csum_unfold(tcph->check);
+ tcp_hdr_csum = csum_partial((u8 *)tcph, TCP_HDR_LEN(tcph), tcp_csum);
+
-+ tcp_ps_hdr_csum = csum_tcpudp_nofold(iph->saddr, iph->daddr,
++ tcp_ps_hdr_csum = CSUM_TCPUDP_NOFOLD(iph->saddr, iph->daddr,
+ len + TCP_HDR_LEN(tcph),
+ IPPROTO_TCP, 0);
+
@@ -627,8 +650,8 @@
+EXPORT_SYMBOL(lro_flush_pkt);
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
===================================================================
---- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
+--- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c 2008-09-24 21:36:07.000000000 +0300
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c 2008-09-24 21:36:49.000000000 +0300
@@ -100,14 +100,9 @@ static void ipoib_get_strings(struct net
}
}
diff -urN a/kernel_patches/backport/2.6.17/ipoib_lro_to_2.6.23.patch b/kernel_patches/backport/2.6.17/ipoib_lro_to_2.6.23.patch
--- a/kernel_patches/backport/2.6.17/ipoib_lro_to_2.6.23.patch 2008-09-24 21:26:45.000000000 +0300
+++ b/kernel_patches/backport/2.6.17/ipoib_lro_to_2.6.23.patch 2008-09-25 20:41:16.000000000 +0300
@@ -1,13 +1,13 @@
---
drivers/infiniband/ulp/ipoib/Makefile | 3
- drivers/infiniband/ulp/ipoib/inet_lro.c | 602 +++++++++++++++++++++++++++
+ drivers/infiniband/ulp/ipoib/inet_lro.c | 625 +++++++++++++++++++++++++++
drivers/infiniband/ulp/ipoib/ipoib_ethtool.c | 13
- 3 files changed, 607 insertions(+), 11 deletions(-)
+ 3 files changed, 630 insertions(+), 11 deletions(-)
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile
===================================================================
---- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/Makefile
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile
+--- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/Makefile 2008-09-24 21:36:07.000000000 +0300
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile 2008-09-24 21:36:49.000000000 +0300
@@ -5,7 +5,8 @@ ib_ipoib-y := ipoib_main.o \
ipoib_multicast.o \
ipoib_verbs.o \
@@ -20,9 +20,9 @@
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c
===================================================================
---- /dev/null
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c
-@@ -0,0 +1,602 @@
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c 2008-09-24 21:56:31.000000000 +0300
+@@ -0,0 +1,625 @@
+/*
+ * linux/net/ipv4/inet_lro.c
+ *
@@ -154,6 +154,29 @@
+ lro_desc->data_csum);
+}
+
++#ifdef __ia64__
++static unsigned int
++static_csum_tcpudp_nofold (unsigned long saddr, unsigned long daddr, unsigned short len,
++ unsigned short proto, unsigned int sum)
++{
++ unsigned long result;
++
++ result = (saddr + daddr + sum +
++ ((unsigned long) ntohs(len) << 16) +
++ ((unsigned long) proto << 8));
++
++ /* Fold down to 32-bits so we don't lose in the typedef-less network stack. */
++ /* 64 to 33 */
++ result = (result & 0xffffffff) + (result >> 32);
++ /* 33 to 32 */
++ result = (result & 0xffffffff) + (result >> 32);
++ return result;
++}
++#define CSUM_TCPUDP_NOFOLD static_csum_tcpudp_nofold
++#else
++#define CSUM_TCPUDP_NOFOLD csum_tcpudp_nofold
++#endif
++
+static __wsum lro_tcp_data_csum(struct iphdr *iph, struct tcphdr *tcph, int len)
+{
+ __wsum tcp_csum;
@@ -163,7 +186,7 @@
+ tcp_csum = ~csum_unfold(tcph->check);
+ tcp_hdr_csum = csum_partial((u8 *)tcph, TCP_HDR_LEN(tcph), tcp_csum);
+
-+ tcp_ps_hdr_csum = csum_tcpudp_nofold(iph->saddr, iph->daddr,
++ tcp_ps_hdr_csum = CSUM_TCPUDP_NOFOLD(iph->saddr, iph->daddr,
+ len + TCP_HDR_LEN(tcph),
+ IPPROTO_TCP, 0);
+
@@ -627,8 +650,8 @@
+EXPORT_SYMBOL(lro_flush_pkt);
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
===================================================================
---- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
+--- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c 2008-09-24 21:36:07.000000000 +0300
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c 2008-09-24 21:36:49.000000000 +0300
@@ -100,14 +100,9 @@ static void ipoib_get_strings(struct net
}
}
diff -urN a/kernel_patches/backport/2.6.18/ipoib_lro_to_2.6.23.patch b/kernel_patches/backport/2.6.18/ipoib_lro_to_2.6.23.patch
--- a/kernel_patches/backport/2.6.18/ipoib_lro_to_2.6.23.patch 2008-09-24 21:26:45.000000000 +0300
+++ b/kernel_patches/backport/2.6.18/ipoib_lro_to_2.6.23.patch 2008-09-25 20:41:16.000000000 +0300
@@ -1,13 +1,13 @@
---
drivers/infiniband/ulp/ipoib/Makefile | 3
- drivers/infiniband/ulp/ipoib/inet_lro.c | 601 +++++++++++++++++++++++++++
+ drivers/infiniband/ulp/ipoib/inet_lro.c | 625 +++++++++++++++++++++++++++
drivers/infiniband/ulp/ipoib/ipoib_ethtool.c | 13
- 3 files changed, 606 insertions(+), 11 deletions(-)
+ 3 files changed, 630 insertions(+), 11 deletions(-)
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile
===================================================================
---- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/Makefile
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile
+--- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/Makefile 2008-09-24 21:36:07.000000000 +0300
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile 2008-09-24 21:36:49.000000000 +0300
@@ -5,7 +5,8 @@ ib_ipoib-y := ipoib_main.o \
ipoib_multicast.o \
ipoib_verbs.o \
@@ -20,9 +20,9 @@
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c
===================================================================
---- /dev/null
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c
-@@ -0,0 +1,601 @@
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c 2008-09-24 21:56:31.000000000 +0300
+@@ -0,0 +1,625 @@
+/*
+ * linux/net/ipv4/inet_lro.c
+ *
@@ -54,6 +54,7 @@
+#include <linux/module.h>
+#include <linux/if_vlan.h>
+#include <linux/inet_lro.h>
++#include <linux/etherdevice.h>
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Jan-Bernd Themann <themann at de.ibm.com>");
@@ -153,6 +154,29 @@
+ lro_desc->data_csum);
+}
+
++#ifdef __ia64__
++static unsigned int
++static_csum_tcpudp_nofold (unsigned long saddr, unsigned long daddr, unsigned short len,
++ unsigned short proto, unsigned int sum)
++{
++ unsigned long result;
++
++ result = (saddr + daddr + sum +
++ ((unsigned long) ntohs(len) << 16) +
++ ((unsigned long) proto << 8));
++
++ /* Fold down to 32-bits so we don't lose in the typedef-less network stack. */
++ /* 64 to 33 */
++ result = (result & 0xffffffff) + (result >> 32);
++ /* 33 to 32 */
++ result = (result & 0xffffffff) + (result >> 32);
++ return result;
++}
++#define CSUM_TCPUDP_NOFOLD static_csum_tcpudp_nofold
++#else
++#define CSUM_TCPUDP_NOFOLD csum_tcpudp_nofold
++#endif
++
+static __wsum lro_tcp_data_csum(struct iphdr *iph, struct tcphdr *tcph, int len)
+{
+ __wsum tcp_csum;
@@ -162,7 +186,7 @@
+ tcp_csum = ~csum_unfold(tcph->check);
+ tcp_hdr_csum = csum_partial((u8 *)tcph, TCP_HDR_LEN(tcph), tcp_csum);
+
-+ tcp_ps_hdr_csum = csum_tcpudp_nofold(iph->saddr, iph->daddr,
++ tcp_ps_hdr_csum = CSUM_TCPUDP_NOFOLD(iph->saddr, iph->daddr,
+ len + TCP_HDR_LEN(tcph),
+ IPPROTO_TCP, 0);
+
@@ -626,8 +650,8 @@
+EXPORT_SYMBOL(lro_flush_pkt);
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
===================================================================
---- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
+--- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c 2008-09-24 21:36:07.000000000 +0300
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c 2008-09-24 21:36:49.000000000 +0300
@@ -100,14 +100,9 @@ static void ipoib_get_strings(struct net
}
}
diff -urN a/kernel_patches/backport/2.6.18-EL5.1/ipoib_lro_to_2.6.23.patch b/kernel_patches/backport/2.6.18-EL5.1/ipoib_lro_to_2.6.23.patch
--- a/kernel_patches/backport/2.6.18-EL5.1/ipoib_lro_to_2.6.23.patch 2008-09-24 21:26:45.000000000 +0300
+++ b/kernel_patches/backport/2.6.18-EL5.1/ipoib_lro_to_2.6.23.patch 2008-09-25 20:41:16.000000000 +0300
@@ -1,13 +1,13 @@
---
drivers/infiniband/ulp/ipoib/Makefile | 3
- drivers/infiniband/ulp/ipoib/inet_lro.c | 601 +++++++++++++++++++++++++++
+ drivers/infiniband/ulp/ipoib/inet_lro.c | 625 +++++++++++++++++++++++++++
drivers/infiniband/ulp/ipoib/ipoib_ethtool.c | 13
- 3 files changed, 606 insertions(+), 11 deletions(-)
+ 3 files changed, 630 insertions(+), 11 deletions(-)
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile
===================================================================
---- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/Makefile
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile
+--- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/Makefile 2008-09-24 21:36:07.000000000 +0300
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile 2008-09-24 21:36:49.000000000 +0300
@@ -5,7 +5,8 @@ ib_ipoib-y := ipoib_main.o \
ipoib_multicast.o \
ipoib_verbs.o \
@@ -20,9 +20,9 @@
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c
===================================================================
---- /dev/null
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c
-@@ -0,0 +1,601 @@
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c 2008-09-24 21:56:31.000000000 +0300
+@@ -0,0 +1,625 @@
+/*
+ * linux/net/ipv4/inet_lro.c
+ *
@@ -54,6 +54,7 @@
+#include <linux/module.h>
+#include <linux/if_vlan.h>
+#include <linux/inet_lro.h>
++#include <linux/etherdevice.h>
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Jan-Bernd Themann <themann at de.ibm.com>");
@@ -153,6 +154,29 @@
+ lro_desc->data_csum);
+}
+
++#ifdef __ia64__
++static unsigned int
++static_csum_tcpudp_nofold (unsigned long saddr, unsigned long daddr, unsigned short len,
++ unsigned short proto, unsigned int sum)
++{
++ unsigned long result;
++
++ result = (saddr + daddr + sum +
++ ((unsigned long) ntohs(len) << 16) +
++ ((unsigned long) proto << 8));
++
++ /* Fold down to 32-bits so we don't lose in the typedef-less network stack. */
++ /* 64 to 33 */
++ result = (result & 0xffffffff) + (result >> 32);
++ /* 33 to 32 */
++ result = (result & 0xffffffff) + (result >> 32);
++ return result;
++}
++#define CSUM_TCPUDP_NOFOLD static_csum_tcpudp_nofold
++#else
++#define CSUM_TCPUDP_NOFOLD csum_tcpudp_nofold
++#endif
++
+static __wsum lro_tcp_data_csum(struct iphdr *iph, struct tcphdr *tcph, int len)
+{
+ __wsum tcp_csum;
@@ -162,7 +186,7 @@
+ tcp_csum = ~csum_unfold(tcph->check);
+ tcp_hdr_csum = csum_partial((u8 *)tcph, TCP_HDR_LEN(tcph), tcp_csum);
+
-+ tcp_ps_hdr_csum = csum_tcpudp_nofold(iph->saddr, iph->daddr,
++ tcp_ps_hdr_csum = CSUM_TCPUDP_NOFOLD(iph->saddr, iph->daddr,
+ len + TCP_HDR_LEN(tcph),
+ IPPROTO_TCP, 0);
+
@@ -626,8 +650,8 @@
+EXPORT_SYMBOL(lro_flush_pkt);
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
===================================================================
---- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
+--- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c 2008-09-24 21:36:07.000000000 +0300
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c 2008-09-24 21:36:49.000000000 +0300
@@ -100,14 +100,9 @@ static void ipoib_get_strings(struct net
}
}
diff -urN a/kernel_patches/backport/2.6.18-EL5.2/ipoib_lro_to_2.6.23.patch b/kernel_patches/backport/2.6.18-EL5.2/ipoib_lro_to_2.6.23.patch
--- a/kernel_patches/backport/2.6.18-EL5.2/ipoib_lro_to_2.6.23.patch 2008-09-24 21:26:45.000000000 +0300
+++ b/kernel_patches/backport/2.6.18-EL5.2/ipoib_lro_to_2.6.23.patch 2008-09-25 20:41:16.000000000 +0300
@@ -1,13 +1,13 @@
---
drivers/infiniband/ulp/ipoib/Makefile | 3
- drivers/infiniband/ulp/ipoib/inet_lro.c | 601 +++++++++++++++++++++++++++
+ drivers/infiniband/ulp/ipoib/inet_lro.c | 625 +++++++++++++++++++++++++++
drivers/infiniband/ulp/ipoib/ipoib_ethtool.c | 13
- 3 files changed, 606 insertions(+), 11 deletions(-)
+ 3 files changed, 630 insertions(+), 11 deletions(-)
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile
===================================================================
---- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/Makefile
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile
+--- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/Makefile 2008-09-24 21:36:07.000000000 +0300
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile 2008-09-24 21:36:49.000000000 +0300
@@ -5,7 +5,8 @@ ib_ipoib-y := ipoib_main.o \
ipoib_multicast.o \
ipoib_verbs.o \
@@ -20,9 +20,9 @@
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c
===================================================================
---- /dev/null
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c
-@@ -0,0 +1,601 @@
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c 2008-09-24 21:56:31.000000000 +0300
+@@ -0,0 +1,625 @@
+/*
+ * linux/net/ipv4/inet_lro.c
+ *
@@ -54,6 +54,7 @@
+#include <linux/module.h>
+#include <linux/if_vlan.h>
+#include <linux/inet_lro.h>
++#include <linux/etherdevice.h>
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Jan-Bernd Themann <themann at de.ibm.com>");
@@ -153,6 +154,29 @@
+ lro_desc->data_csum);
+}
+
++#ifdef __ia64__
++static unsigned int
++static_csum_tcpudp_nofold (unsigned long saddr, unsigned long daddr, unsigned short len,
++ unsigned short proto, unsigned int sum)
++{
++ unsigned long result;
++
++ result = (saddr + daddr + sum +
++ ((unsigned long) ntohs(len) << 16) +
++ ((unsigned long) proto << 8));
++
++ /* Fold down to 32-bits so we don't lose in the typedef-less network stack. */
++ /* 64 to 33 */
++ result = (result & 0xffffffff) + (result >> 32);
++ /* 33 to 32 */
++ result = (result & 0xffffffff) + (result >> 32);
++ return result;
++}
++#define CSUM_TCPUDP_NOFOLD static_csum_tcpudp_nofold
++#else
++#define CSUM_TCPUDP_NOFOLD csum_tcpudp_nofold
++#endif
++
+static __wsum lro_tcp_data_csum(struct iphdr *iph, struct tcphdr *tcph, int len)
+{
+ __wsum tcp_csum;
@@ -162,7 +186,7 @@
+ tcp_csum = ~csum_unfold(tcph->check);
+ tcp_hdr_csum = csum_partial((u8 *)tcph, TCP_HDR_LEN(tcph), tcp_csum);
+
-+ tcp_ps_hdr_csum = csum_tcpudp_nofold(iph->saddr, iph->daddr,
++ tcp_ps_hdr_csum = CSUM_TCPUDP_NOFOLD(iph->saddr, iph->daddr,
+ len + TCP_HDR_LEN(tcph),
+ IPPROTO_TCP, 0);
+
@@ -626,8 +650,8 @@
+EXPORT_SYMBOL(lro_flush_pkt);
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
===================================================================
---- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
+--- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c 2008-09-24 21:36:07.000000000 +0300
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c 2008-09-24 21:36:49.000000000 +0300
@@ -100,14 +100,9 @@ static void ipoib_get_strings(struct net
}
}
diff -urN a/kernel_patches/backport/2.6.18_FC6/ipoib_lro_to_2.6.23.patch b/kernel_patches/backport/2.6.18_FC6/ipoib_lro_to_2.6.23.patch
--- a/kernel_patches/backport/2.6.18_FC6/ipoib_lro_to_2.6.23.patch 2008-09-24 21:26:45.000000000 +0300
+++ b/kernel_patches/backport/2.6.18_FC6/ipoib_lro_to_2.6.23.patch 2008-09-25 20:41:16.000000000 +0300
@@ -1,13 +1,13 @@
---
drivers/infiniband/ulp/ipoib/Makefile | 3
- drivers/infiniband/ulp/ipoib/inet_lro.c | 601 +++++++++++++++++++++++++++
+ drivers/infiniband/ulp/ipoib/inet_lro.c | 625 +++++++++++++++++++++++++++
drivers/infiniband/ulp/ipoib/ipoib_ethtool.c | 13
- 3 files changed, 606 insertions(+), 11 deletions(-)
+ 3 files changed, 630 insertions(+), 11 deletions(-)
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile
===================================================================
---- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/Makefile
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile
+--- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/Makefile 2008-09-24 21:36:07.000000000 +0300
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile 2008-09-24 21:36:49.000000000 +0300
@@ -5,7 +5,8 @@ ib_ipoib-y := ipoib_main.o \
ipoib_multicast.o \
ipoib_verbs.o \
@@ -20,9 +20,9 @@
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c
===================================================================
---- /dev/null
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c
-@@ -0,0 +1,601 @@
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c 2008-09-24 21:56:31.000000000 +0300
+@@ -0,0 +1,625 @@
+/*
+ * linux/net/ipv4/inet_lro.c
+ *
@@ -54,6 +54,7 @@
+#include <linux/module.h>
+#include <linux/if_vlan.h>
+#include <linux/inet_lro.h>
++#include <linux/etherdevice.h>
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Jan-Bernd Themann <themann at de.ibm.com>");
@@ -153,6 +154,29 @@
+ lro_desc->data_csum);
+}
+
++#ifdef __ia64__
++static unsigned int
++static_csum_tcpudp_nofold (unsigned long saddr, unsigned long daddr, unsigned short len,
++ unsigned short proto, unsigned int sum)
++{
++ unsigned long result;
++
++ result = (saddr + daddr + sum +
++ ((unsigned long) ntohs(len) << 16) +
++ ((unsigned long) proto << 8));
++
++ /* Fold down to 32-bits so we don't lose in the typedef-less network stack. */
++ /* 64 to 33 */
++ result = (result & 0xffffffff) + (result >> 32);
++ /* 33 to 32 */
++ result = (result & 0xffffffff) + (result >> 32);
++ return result;
++}
++#define CSUM_TCPUDP_NOFOLD static_csum_tcpudp_nofold
++#else
++#define CSUM_TCPUDP_NOFOLD csum_tcpudp_nofold
++#endif
++
+static __wsum lro_tcp_data_csum(struct iphdr *iph, struct tcphdr *tcph, int len)
+{
+ __wsum tcp_csum;
@@ -162,7 +186,7 @@
+ tcp_csum = ~csum_unfold(tcph->check);
+ tcp_hdr_csum = csum_partial((u8 *)tcph, TCP_HDR_LEN(tcph), tcp_csum);
+
-+ tcp_ps_hdr_csum = csum_tcpudp_nofold(iph->saddr, iph->daddr,
++ tcp_ps_hdr_csum = CSUM_TCPUDP_NOFOLD(iph->saddr, iph->daddr,
+ len + TCP_HDR_LEN(tcph),
+ IPPROTO_TCP, 0);
+
@@ -626,8 +650,8 @@
+EXPORT_SYMBOL(lro_flush_pkt);
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
===================================================================
---- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
+--- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c 2008-09-24 21:36:07.000000000 +0300
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c 2008-09-24 21:36:49.000000000 +0300
@@ -100,14 +100,9 @@ static void ipoib_get_strings(struct net
}
}
diff -urN a/kernel_patches/backport/2.6.18_suse10_2/ipoib_lro_to_2.6.23.patch b/kernel_patches/backport/2.6.18_suse10_2/ipoib_lro_to_2.6.23.patch
--- a/kernel_patches/backport/2.6.18_suse10_2/ipoib_lro_to_2.6.23.patch 2008-09-24 21:26:46.000000000 +0300
+++ b/kernel_patches/backport/2.6.18_suse10_2/ipoib_lro_to_2.6.23.patch 2008-09-25 20:41:16.000000000 +0300
@@ -1,13 +1,13 @@
---
drivers/infiniband/ulp/ipoib/Makefile | 3
- drivers/infiniband/ulp/ipoib/inet_lro.c | 601 +++++++++++++++++++++++++++
+ drivers/infiniband/ulp/ipoib/inet_lro.c | 625 +++++++++++++++++++++++++++
drivers/infiniband/ulp/ipoib/ipoib_ethtool.c | 13
- 3 files changed, 606 insertions(+), 11 deletions(-)
+ 3 files changed, 630 insertions(+), 11 deletions(-)
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile
===================================================================
---- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/Makefile
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile
+--- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/Makefile 2008-09-24 21:36:07.000000000 +0300
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile 2008-09-24 21:36:49.000000000 +0300
@@ -5,7 +5,8 @@ ib_ipoib-y := ipoib_main.o \
ipoib_multicast.o \
ipoib_verbs.o \
@@ -20,9 +20,9 @@
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c
===================================================================
---- /dev/null
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c
-@@ -0,0 +1,601 @@
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c 2008-09-24 21:56:31.000000000 +0300
+@@ -0,0 +1,625 @@
+/*
+ * linux/net/ipv4/inet_lro.c
+ *
@@ -54,6 +54,7 @@
+#include <linux/module.h>
+#include <linux/if_vlan.h>
+#include <linux/inet_lro.h>
++#include <linux/etherdevice.h>
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Jan-Bernd Themann <themann at de.ibm.com>");
@@ -153,6 +154,29 @@
+ lro_desc->data_csum);
+}
+
++#ifdef __ia64__
++static unsigned int
++static_csum_tcpudp_nofold (unsigned long saddr, unsigned long daddr, unsigned short len,
++ unsigned short proto, unsigned int sum)
++{
++ unsigned long result;
++
++ result = (saddr + daddr + sum +
++ ((unsigned long) ntohs(len) << 16) +
++ ((unsigned long) proto << 8));
++
++ /* Fold down to 32-bits so we don't lose in the typedef-less network stack. */
++ /* 64 to 33 */
++ result = (result & 0xffffffff) + (result >> 32);
++ /* 33 to 32 */
++ result = (result & 0xffffffff) + (result >> 32);
++ return result;
++}
++#define CSUM_TCPUDP_NOFOLD static_csum_tcpudp_nofold
++#else
++#define CSUM_TCPUDP_NOFOLD csum_tcpudp_nofold
++#endif
++
+static __wsum lro_tcp_data_csum(struct iphdr *iph, struct tcphdr *tcph, int len)
+{
+ __wsum tcp_csum;
@@ -162,7 +186,7 @@
+ tcp_csum = ~csum_unfold(tcph->check);
+ tcp_hdr_csum = csum_partial((u8 *)tcph, TCP_HDR_LEN(tcph), tcp_csum);
+
-+ tcp_ps_hdr_csum = csum_tcpudp_nofold(iph->saddr, iph->daddr,
++ tcp_ps_hdr_csum = CSUM_TCPUDP_NOFOLD(iph->saddr, iph->daddr,
+ len + TCP_HDR_LEN(tcph),
+ IPPROTO_TCP, 0);
+
@@ -626,8 +650,8 @@
+EXPORT_SYMBOL(lro_flush_pkt);
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
===================================================================
---- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
+--- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c 2008-09-24 21:36:07.000000000 +0300
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c 2008-09-24 21:36:49.000000000 +0300
@@ -100,14 +100,9 @@ static void ipoib_get_strings(struct net
}
}
diff -urN a/kernel_patches/backport/2.6.19/ipoib_lro_to_2.6.23.patch b/kernel_patches/backport/2.6.19/ipoib_lro_to_2.6.23.patch
--- a/kernel_patches/backport/2.6.19/ipoib_lro_to_2.6.23.patch 2008-09-24 21:26:46.000000000 +0300
+++ b/kernel_patches/backport/2.6.19/ipoib_lro_to_2.6.23.patch 2008-09-25 20:41:16.000000000 +0300
@@ -1,13 +1,13 @@
---
drivers/infiniband/ulp/ipoib/Makefile | 3
- drivers/infiniband/ulp/ipoib/inet_lro.c | 601 +++++++++++++++++++++++++++
+ drivers/infiniband/ulp/ipoib/inet_lro.c | 625 +++++++++++++++++++++++++++
drivers/infiniband/ulp/ipoib/ipoib_ethtool.c | 13
- 3 files changed, 606 insertions(+), 11 deletions(-)
+ 3 files changed, 630 insertions(+), 11 deletions(-)
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile
===================================================================
---- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/Makefile
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile
+--- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/Makefile 2008-09-24 21:36:07.000000000 +0300
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile 2008-09-24 21:36:49.000000000 +0300
@@ -5,7 +5,8 @@ ib_ipoib-y := ipoib_main.o \
ipoib_multicast.o \
ipoib_verbs.o \
@@ -20,9 +20,9 @@
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c
===================================================================
---- /dev/null
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c
-@@ -0,0 +1,601 @@
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c 2008-09-24 21:56:31.000000000 +0300
+@@ -0,0 +1,625 @@
+/*
+ * linux/net/ipv4/inet_lro.c
+ *
@@ -54,6 +54,7 @@
+#include <linux/module.h>
+#include <linux/if_vlan.h>
+#include <linux/inet_lro.h>
++#include <linux/etherdevice.h>
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Jan-Bernd Themann <themann at de.ibm.com>");
@@ -153,6 +154,29 @@
+ lro_desc->data_csum);
+}
+
++#ifdef __ia64__
++static unsigned int
++static_csum_tcpudp_nofold (unsigned long saddr, unsigned long daddr, unsigned short len,
++ unsigned short proto, unsigned int sum)
++{
++ unsigned long result;
++
++ result = (saddr + daddr + sum +
++ ((unsigned long) ntohs(len) << 16) +
++ ((unsigned long) proto << 8));
++
++ /* Fold down to 32-bits so we don't lose in the typedef-less network stack. */
++ /* 64 to 33 */
++ result = (result & 0xffffffff) + (result >> 32);
++ /* 33 to 32 */
++ result = (result & 0xffffffff) + (result >> 32);
++ return result;
++}
++#define CSUM_TCPUDP_NOFOLD static_csum_tcpudp_nofold
++#else
++#define CSUM_TCPUDP_NOFOLD csum_tcpudp_nofold
++#endif
++
+static __wsum lro_tcp_data_csum(struct iphdr *iph, struct tcphdr *tcph, int len)
+{
+ __wsum tcp_csum;
@@ -162,7 +186,7 @@
+ tcp_csum = ~csum_unfold(tcph->check);
+ tcp_hdr_csum = csum_partial((u8 *)tcph, TCP_HDR_LEN(tcph), tcp_csum);
+
-+ tcp_ps_hdr_csum = csum_tcpudp_nofold(iph->saddr, iph->daddr,
++ tcp_ps_hdr_csum = CSUM_TCPUDP_NOFOLD(iph->saddr, iph->daddr,
+ len + TCP_HDR_LEN(tcph),
+ IPPROTO_TCP, 0);
+
@@ -626,8 +650,8 @@
+EXPORT_SYMBOL(lro_flush_pkt);
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
===================================================================
---- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
+--- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c 2008-09-24 21:36:07.000000000 +0300
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c 2008-09-24 21:36:49.000000000 +0300
@@ -100,14 +100,9 @@ static void ipoib_get_strings(struct net
}
}
diff -urN a/kernel_patches/backport/2.6.20/ipoib_lro_to_2.6.23.patch b/kernel_patches/backport/2.6.20/ipoib_lro_to_2.6.23.patch
--- a/kernel_patches/backport/2.6.20/ipoib_lro_to_2.6.23.patch 2008-09-24 21:26:46.000000000 +0300
+++ b/kernel_patches/backport/2.6.20/ipoib_lro_to_2.6.23.patch 2008-09-25 20:41:16.000000000 +0300
@@ -1,13 +1,13 @@
---
drivers/infiniband/ulp/ipoib/Makefile | 3
- drivers/infiniband/ulp/ipoib/inet_lro.c | 601 +++++++++++++++++++++++++++
+ drivers/infiniband/ulp/ipoib/inet_lro.c | 625 +++++++++++++++++++++++++++
drivers/infiniband/ulp/ipoib/ipoib_ethtool.c | 13
- 3 files changed, 606 insertions(+), 11 deletions(-)
+ 3 files changed, 630 insertions(+), 11 deletions(-)
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile
===================================================================
---- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/Makefile
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile
+--- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/Makefile 2008-09-24 21:36:07.000000000 +0300
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile 2008-09-24 21:36:49.000000000 +0300
@@ -5,7 +5,8 @@ ib_ipoib-y := ipoib_main.o \
ipoib_multicast.o \
ipoib_verbs.o \
@@ -20,9 +20,9 @@
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c
===================================================================
---- /dev/null
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c
-@@ -0,0 +1,601 @@
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c 2008-09-24 21:56:31.000000000 +0300
+@@ -0,0 +1,625 @@
+/*
+ * linux/net/ipv4/inet_lro.c
+ *
@@ -54,6 +54,7 @@
+#include <linux/module.h>
+#include <linux/if_vlan.h>
+#include <linux/inet_lro.h>
++#include <linux/etherdevice.h>
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Jan-Bernd Themann <themann at de.ibm.com>");
@@ -153,6 +154,29 @@
+ lro_desc->data_csum);
+}
+
++#ifdef __ia64__
++static unsigned int
++static_csum_tcpudp_nofold (unsigned long saddr, unsigned long daddr, unsigned short len,
++ unsigned short proto, unsigned int sum)
++{
++ unsigned long result;
++
++ result = (saddr + daddr + sum +
++ ((unsigned long) ntohs(len) << 16) +
++ ((unsigned long) proto << 8));
++
++ /* Fold down to 32-bits so we don't lose in the typedef-less network stack. */
++ /* 64 to 33 */
++ result = (result & 0xffffffff) + (result >> 32);
++ /* 33 to 32 */
++ result = (result & 0xffffffff) + (result >> 32);
++ return result;
++}
++#define CSUM_TCPUDP_NOFOLD static_csum_tcpudp_nofold
++#else
++#define CSUM_TCPUDP_NOFOLD csum_tcpudp_nofold
++#endif
++
+static __wsum lro_tcp_data_csum(struct iphdr *iph, struct tcphdr *tcph, int len)
+{
+ __wsum tcp_csum;
@@ -162,7 +186,7 @@
+ tcp_csum = ~csum_unfold(tcph->check);
+ tcp_hdr_csum = csum_partial((u8 *)tcph, TCP_HDR_LEN(tcph), tcp_csum);
+
-+ tcp_ps_hdr_csum = csum_tcpudp_nofold(iph->saddr, iph->daddr,
++ tcp_ps_hdr_csum = CSUM_TCPUDP_NOFOLD(iph->saddr, iph->daddr,
+ len + TCP_HDR_LEN(tcph),
+ IPPROTO_TCP, 0);
+
@@ -626,8 +650,8 @@
+EXPORT_SYMBOL(lro_flush_pkt);
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
===================================================================
---- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
+--- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c 2008-09-24 21:36:07.000000000 +0300
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c 2008-09-24 21:36:49.000000000 +0300
@@ -100,14 +100,9 @@ static void ipoib_get_strings(struct net
}
}
diff -urN a/kernel_patches/backport/2.6.21/ipoib_lro_to_2.6.23.patch b/kernel_patches/backport/2.6.21/ipoib_lro_to_2.6.23.patch
--- a/kernel_patches/backport/2.6.21/ipoib_lro_to_2.6.23.patch 2008-09-24 21:26:46.000000000 +0300
+++ b/kernel_patches/backport/2.6.21/ipoib_lro_to_2.6.23.patch 2008-09-25 20:41:16.000000000 +0300
@@ -1,13 +1,13 @@
---
drivers/infiniband/ulp/ipoib/Makefile | 3
- drivers/infiniband/ulp/ipoib/inet_lro.c | 601 +++++++++++++++++++++++++++
+ drivers/infiniband/ulp/ipoib/inet_lro.c | 625 +++++++++++++++++++++++++++
drivers/infiniband/ulp/ipoib/ipoib_ethtool.c | 13
- 3 files changed, 606 insertions(+), 11 deletions(-)
+ 3 files changed, 630 insertions(+), 11 deletions(-)
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile
===================================================================
---- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/Makefile
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile
+--- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/Makefile 2008-09-24 21:36:07.000000000 +0300
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile 2008-09-24 21:36:49.000000000 +0300
@@ -5,7 +5,8 @@ ib_ipoib-y := ipoib_main.o \
ipoib_multicast.o \
ipoib_verbs.o \
@@ -20,9 +20,9 @@
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c
===================================================================
---- /dev/null
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c
-@@ -0,0 +1,601 @@
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c 2008-09-24 21:56:31.000000000 +0300
+@@ -0,0 +1,625 @@
+/*
+ * linux/net/ipv4/inet_lro.c
+ *
@@ -54,6 +54,7 @@
+#include <linux/module.h>
+#include <linux/if_vlan.h>
+#include <linux/inet_lro.h>
++#include <linux/etherdevice.h>
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Jan-Bernd Themann <themann at de.ibm.com>");
@@ -153,6 +154,29 @@
+ lro_desc->data_csum);
+}
+
++#ifdef __ia64__
++static unsigned int
++static_csum_tcpudp_nofold (unsigned long saddr, unsigned long daddr, unsigned short len,
++ unsigned short proto, unsigned int sum)
++{
++ unsigned long result;
++
++ result = (saddr + daddr + sum +
++ ((unsigned long) ntohs(len) << 16) +
++ ((unsigned long) proto << 8));
++
++ /* Fold down to 32-bits so we don't lose in the typedef-less network stack. */
++ /* 64 to 33 */
++ result = (result & 0xffffffff) + (result >> 32);
++ /* 33 to 32 */
++ result = (result & 0xffffffff) + (result >> 32);
++ return result;
++}
++#define CSUM_TCPUDP_NOFOLD static_csum_tcpudp_nofold
++#else
++#define CSUM_TCPUDP_NOFOLD csum_tcpudp_nofold
++#endif
++
+static __wsum lro_tcp_data_csum(struct iphdr *iph, struct tcphdr *tcph, int len)
+{
+ __wsum tcp_csum;
@@ -162,7 +186,7 @@
+ tcp_csum = ~csum_unfold(tcph->check);
+ tcp_hdr_csum = csum_partial((u8 *)tcph, TCP_HDR_LEN(tcph), tcp_csum);
+
-+ tcp_ps_hdr_csum = csum_tcpudp_nofold(iph->saddr, iph->daddr,
++ tcp_ps_hdr_csum = CSUM_TCPUDP_NOFOLD(iph->saddr, iph->daddr,
+ len + TCP_HDR_LEN(tcph),
+ IPPROTO_TCP, 0);
+
@@ -626,8 +650,8 @@
+EXPORT_SYMBOL(lro_flush_pkt);
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
===================================================================
---- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
+--- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c 2008-09-24 21:36:07.000000000 +0300
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c 2008-09-24 21:36:49.000000000 +0300
@@ -100,14 +100,9 @@ static void ipoib_get_strings(struct net
}
}
diff -urN a/kernel_patches/backport/2.6.22/ipoib_lro_to_2.6.23.patch b/kernel_patches/backport/2.6.22/ipoib_lro_to_2.6.23.patch
--- a/kernel_patches/backport/2.6.22/ipoib_lro_to_2.6.23.patch 2008-09-24 21:26:46.000000000 +0300
+++ b/kernel_patches/backport/2.6.22/ipoib_lro_to_2.6.23.patch 2008-09-25 20:41:16.000000000 +0300
@@ -1,13 +1,13 @@
---
drivers/infiniband/ulp/ipoib/Makefile | 3
- drivers/infiniband/ulp/ipoib/inet_lro.c | 601 +++++++++++++++++++++++++++
+ drivers/infiniband/ulp/ipoib/inet_lro.c | 625 +++++++++++++++++++++++++++
drivers/infiniband/ulp/ipoib/ipoib_ethtool.c | 13
- 3 files changed, 606 insertions(+), 11 deletions(-)
+ 3 files changed, 630 insertions(+), 11 deletions(-)
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile
===================================================================
---- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/Makefile
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile
+--- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/Makefile 2008-09-24 21:36:07.000000000 +0300
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile 2008-09-24 21:36:49.000000000 +0300
@@ -5,7 +5,8 @@ ib_ipoib-y := ipoib_main.o \
ipoib_multicast.o \
ipoib_verbs.o \
@@ -20,9 +20,9 @@
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c
===================================================================
---- /dev/null
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c
-@@ -0,0 +1,601 @@
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c 2008-09-24 21:56:31.000000000 +0300
+@@ -0,0 +1,625 @@
+/*
+ * linux/net/ipv4/inet_lro.c
+ *
@@ -54,6 +54,7 @@
+#include <linux/module.h>
+#include <linux/if_vlan.h>
+#include <linux/inet_lro.h>
++#include <linux/etherdevice.h>
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Jan-Bernd Themann <themann at de.ibm.com>");
@@ -153,6 +154,29 @@
+ lro_desc->data_csum);
+}
+
++#ifdef __ia64__
++static unsigned int
++static_csum_tcpudp_nofold (unsigned long saddr, unsigned long daddr, unsigned short len,
++ unsigned short proto, unsigned int sum)
++{
++ unsigned long result;
++
++ result = (saddr + daddr + sum +
++ ((unsigned long) ntohs(len) << 16) +
++ ((unsigned long) proto << 8));
++
++ /* Fold down to 32-bits so we don't lose in the typedef-less network stack. */
++ /* 64 to 33 */
++ result = (result & 0xffffffff) + (result >> 32);
++ /* 33 to 32 */
++ result = (result & 0xffffffff) + (result >> 32);
++ return result;
++}
++#define CSUM_TCPUDP_NOFOLD static_csum_tcpudp_nofold
++#else
++#define CSUM_TCPUDP_NOFOLD csum_tcpudp_nofold
++#endif
++
+static __wsum lro_tcp_data_csum(struct iphdr *iph, struct tcphdr *tcph, int len)
+{
+ __wsum tcp_csum;
@@ -162,7 +186,7 @@
+ tcp_csum = ~csum_unfold(tcph->check);
+ tcp_hdr_csum = csum_partial((u8 *)tcph, TCP_HDR_LEN(tcph), tcp_csum);
+
-+ tcp_ps_hdr_csum = csum_tcpudp_nofold(iph->saddr, iph->daddr,
++ tcp_ps_hdr_csum = CSUM_TCPUDP_NOFOLD(iph->saddr, iph->daddr,
+ len + TCP_HDR_LEN(tcph),
+ IPPROTO_TCP, 0);
+
@@ -626,8 +650,8 @@
+EXPORT_SYMBOL(lro_flush_pkt);
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
===================================================================
---- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
+--- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c 2008-09-24 21:36:07.000000000 +0300
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c 2008-09-24 21:36:49.000000000 +0300
@@ -100,14 +100,9 @@ static void ipoib_get_strings(struct net
}
}
diff -urN a/kernel_patches/backport/2.6.22_suse10_3/ipoib_lro_to_2.6.23.patch b/kernel_patches/backport/2.6.22_suse10_3/ipoib_lro_to_2.6.23.patch
--- a/kernel_patches/backport/2.6.22_suse10_3/ipoib_lro_to_2.6.23.patch 2008-09-24 21:26:46.000000000 +0300
+++ b/kernel_patches/backport/2.6.22_suse10_3/ipoib_lro_to_2.6.23.patch 2008-09-25 20:41:16.000000000 +0300
@@ -1,13 +1,13 @@
---
drivers/infiniband/ulp/ipoib/Makefile | 3
- drivers/infiniband/ulp/ipoib/inet_lro.c | 601 +++++++++++++++++++++++++++
+ drivers/infiniband/ulp/ipoib/inet_lro.c | 625 +++++++++++++++++++++++++++
drivers/infiniband/ulp/ipoib/ipoib_ethtool.c | 13
- 3 files changed, 606 insertions(+), 11 deletions(-)
+ 3 files changed, 630 insertions(+), 11 deletions(-)
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile
===================================================================
---- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/Makefile
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile
+--- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/Makefile 2008-09-24 21:36:07.000000000 +0300
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile 2008-09-24 21:36:49.000000000 +0300
@@ -5,7 +5,8 @@ ib_ipoib-y := ipoib_main.o \
ipoib_multicast.o \
ipoib_verbs.o \
@@ -20,9 +20,9 @@
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c
===================================================================
---- /dev/null
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c
-@@ -0,0 +1,601 @@
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c 2008-09-24 21:56:31.000000000 +0300
+@@ -0,0 +1,625 @@
+/*
+ * linux/net/ipv4/inet_lro.c
+ *
@@ -54,6 +54,7 @@
+#include <linux/module.h>
+#include <linux/if_vlan.h>
+#include <linux/inet_lro.h>
++#include <linux/etherdevice.h>
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Jan-Bernd Themann <themann at de.ibm.com>");
@@ -153,6 +154,29 @@
+ lro_desc->data_csum);
+}
+
++#ifdef __ia64__
++static unsigned int
++static_csum_tcpudp_nofold (unsigned long saddr, unsigned long daddr, unsigned short len,
++ unsigned short proto, unsigned int sum)
++{
++ unsigned long result;
++
++ result = (saddr + daddr + sum +
++ ((unsigned long) ntohs(len) << 16) +
++ ((unsigned long) proto << 8));
++
++ /* Fold down to 32-bits so we don't lose in the typedef-less network stack. */
++ /* 64 to 33 */
++ result = (result & 0xffffffff) + (result >> 32);
++ /* 33 to 32 */
++ result = (result & 0xffffffff) + (result >> 32);
++ return result;
++}
++#define CSUM_TCPUDP_NOFOLD static_csum_tcpudp_nofold
++#else
++#define CSUM_TCPUDP_NOFOLD csum_tcpudp_nofold
++#endif
++
+static __wsum lro_tcp_data_csum(struct iphdr *iph, struct tcphdr *tcph, int len)
+{
+ __wsum tcp_csum;
@@ -162,7 +186,7 @@
+ tcp_csum = ~csum_unfold(tcph->check);
+ tcp_hdr_csum = csum_partial((u8 *)tcph, TCP_HDR_LEN(tcph), tcp_csum);
+
-+ tcp_ps_hdr_csum = csum_tcpudp_nofold(iph->saddr, iph->daddr,
++ tcp_ps_hdr_csum = CSUM_TCPUDP_NOFOLD(iph->saddr, iph->daddr,
+ len + TCP_HDR_LEN(tcph),
+ IPPROTO_TCP, 0);
+
@@ -626,8 +650,8 @@
+EXPORT_SYMBOL(lro_flush_pkt);
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
===================================================================
---- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
+--- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c 2008-09-24 21:36:07.000000000 +0300
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c 2008-09-24 21:36:49.000000000 +0300
@@ -100,14 +100,9 @@ static void ipoib_get_strings(struct net
}
}
diff -urN a/kernel_patches/backport/2.6.9_U4/ipoib_lro_to_2.6.23.patch b/kernel_patches/backport/2.6.9_U4/ipoib_lro_to_2.6.23.patch
--- a/kernel_patches/backport/2.6.9_U4/ipoib_lro_to_2.6.23.patch 2008-09-24 21:26:46.000000000 +0300
+++ b/kernel_patches/backport/2.6.9_U4/ipoib_lro_to_2.6.23.patch 2008-09-25 20:41:16.000000000 +0300
@@ -1,13 +1,13 @@
---
drivers/infiniband/ulp/ipoib/Makefile | 3
- drivers/infiniband/ulp/ipoib/inet_lro.c | 602 +++++++++++++++++++++++++++
+ drivers/infiniband/ulp/ipoib/inet_lro.c | 625 +++++++++++++++++++++++++++
drivers/infiniband/ulp/ipoib/ipoib_ethtool.c | 13
- 3 files changed, 607 insertions(+), 11 deletions(-)
+ 3 files changed, 630 insertions(+), 11 deletions(-)
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile
===================================================================
---- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/Makefile
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile
+--- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/Makefile 2008-09-24 21:36:07.000000000 +0300
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile 2008-09-24 21:36:49.000000000 +0300
@@ -5,7 +5,8 @@ ib_ipoib-y := ipoib_main.o \
ipoib_multicast.o \
ipoib_verbs.o \
@@ -20,9 +20,9 @@
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c
===================================================================
---- /dev/null
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c
-@@ -0,0 +1,602 @@
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c 2008-09-24 21:56:31.000000000 +0300
+@@ -0,0 +1,625 @@
+/*
+ * linux/net/ipv4/inet_lro.c
+ *
@@ -154,6 +154,29 @@
+ lro_desc->data_csum);
+}
+
++#ifdef __ia64__
++static unsigned int
++static_csum_tcpudp_nofold (unsigned long saddr, unsigned long daddr, unsigned short len,
++ unsigned short proto, unsigned int sum)
++{
++ unsigned long result;
++
++ result = (saddr + daddr + sum +
++ ((unsigned long) ntohs(len) << 16) +
++ ((unsigned long) proto << 8));
++
++ /* Fold down to 32-bits so we don't lose in the typedef-less network stack. */
++ /* 64 to 33 */
++ result = (result & 0xffffffff) + (result >> 32);
++ /* 33 to 32 */
++ result = (result & 0xffffffff) + (result >> 32);
++ return result;
++}
++#define CSUM_TCPUDP_NOFOLD static_csum_tcpudp_nofold
++#else
++#define CSUM_TCPUDP_NOFOLD csum_tcpudp_nofold
++#endif
++
+static __wsum lro_tcp_data_csum(struct iphdr *iph, struct tcphdr *tcph, int len)
+{
+ __wsum tcp_csum;
@@ -163,7 +186,7 @@
+ tcp_csum = ~csum_unfold(tcph->check);
+ tcp_hdr_csum = csum_partial((u8 *)tcph, TCP_HDR_LEN(tcph), tcp_csum);
+
-+ tcp_ps_hdr_csum = csum_tcpudp_nofold(iph->saddr, iph->daddr,
++ tcp_ps_hdr_csum = CSUM_TCPUDP_NOFOLD(iph->saddr, iph->daddr,
+ len + TCP_HDR_LEN(tcph),
+ IPPROTO_TCP, 0);
+
@@ -627,8 +650,8 @@
+EXPORT_SYMBOL(lro_flush_pkt);
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
===================================================================
---- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
+--- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c 2008-09-24 21:36:07.000000000 +0300
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c 2008-09-24 21:36:49.000000000 +0300
@@ -100,14 +100,9 @@ static void ipoib_get_strings(struct net
}
}
diff -urN a/kernel_patches/backport/2.6.9_U5/ipoib_lro_to_2.6.23.patch b/kernel_patches/backport/2.6.9_U5/ipoib_lro_to_2.6.23.patch
--- a/kernel_patches/backport/2.6.9_U5/ipoib_lro_to_2.6.23.patch 2008-09-24 21:26:46.000000000 +0300
+++ b/kernel_patches/backport/2.6.9_U5/ipoib_lro_to_2.6.23.patch 2008-09-25 20:41:16.000000000 +0300
@@ -1,13 +1,13 @@
---
drivers/infiniband/ulp/ipoib/Makefile | 3
- drivers/infiniband/ulp/ipoib/inet_lro.c | 602 +++++++++++++++++++++++++++
+ drivers/infiniband/ulp/ipoib/inet_lro.c | 625 +++++++++++++++++++++++++++
drivers/infiniband/ulp/ipoib/ipoib_ethtool.c | 13
- 3 files changed, 607 insertions(+), 11 deletions(-)
+ 3 files changed, 630 insertions(+), 11 deletions(-)
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile
===================================================================
---- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/Makefile
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile
+--- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/Makefile 2008-09-24 21:36:07.000000000 +0300
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile 2008-09-24 21:36:49.000000000 +0300
@@ -5,7 +5,8 @@ ib_ipoib-y := ipoib_main.o \
ipoib_multicast.o \
ipoib_verbs.o \
@@ -20,9 +20,9 @@
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c
===================================================================
---- /dev/null
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c
-@@ -0,0 +1,602 @@
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c 2008-09-24 21:56:31.000000000 +0300
+@@ -0,0 +1,625 @@
+/*
+ * linux/net/ipv4/inet_lro.c
+ *
@@ -154,6 +154,29 @@
+ lro_desc->data_csum);
+}
+
++#ifdef __ia64__
++static unsigned int
++static_csum_tcpudp_nofold (unsigned long saddr, unsigned long daddr, unsigned short len,
++ unsigned short proto, unsigned int sum)
++{
++ unsigned long result;
++
++ result = (saddr + daddr + sum +
++ ((unsigned long) ntohs(len) << 16) +
++ ((unsigned long) proto << 8));
++
++ /* Fold down to 32-bits so we don't lose in the typedef-less network stack. */
++ /* 64 to 33 */
++ result = (result & 0xffffffff) + (result >> 32);
++ /* 33 to 32 */
++ result = (result & 0xffffffff) + (result >> 32);
++ return result;
++}
++#define CSUM_TCPUDP_NOFOLD static_csum_tcpudp_nofold
++#else
++#define CSUM_TCPUDP_NOFOLD csum_tcpudp_nofold
++#endif
++
+static __wsum lro_tcp_data_csum(struct iphdr *iph, struct tcphdr *tcph, int len)
+{
+ __wsum tcp_csum;
@@ -163,7 +186,7 @@
+ tcp_csum = ~csum_unfold(tcph->check);
+ tcp_hdr_csum = csum_partial((u8 *)tcph, TCP_HDR_LEN(tcph), tcp_csum);
+
-+ tcp_ps_hdr_csum = csum_tcpudp_nofold(iph->saddr, iph->daddr,
++ tcp_ps_hdr_csum = CSUM_TCPUDP_NOFOLD(iph->saddr, iph->daddr,
+ len + TCP_HDR_LEN(tcph),
+ IPPROTO_TCP, 0);
+
@@ -627,8 +650,8 @@
+EXPORT_SYMBOL(lro_flush_pkt);
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
===================================================================
---- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
+--- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c 2008-09-24 21:36:07.000000000 +0300
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c 2008-09-24 21:36:49.000000000 +0300
@@ -100,14 +100,9 @@ static void ipoib_get_strings(struct net
}
}
diff -urN a/kernel_patches/backport/2.6.9_U6/ipoib_lro_to_2.6.23.patch b/kernel_patches/backport/2.6.9_U6/ipoib_lro_to_2.6.23.patch
--- a/kernel_patches/backport/2.6.9_U6/ipoib_lro_to_2.6.23.patch 2008-09-24 21:26:46.000000000 +0300
+++ b/kernel_patches/backport/2.6.9_U6/ipoib_lro_to_2.6.23.patch 2008-09-25 20:41:16.000000000 +0300
@@ -1,13 +1,13 @@
---
drivers/infiniband/ulp/ipoib/Makefile | 3
- drivers/infiniband/ulp/ipoib/inet_lro.c | 602 +++++++++++++++++++++++++++
+ drivers/infiniband/ulp/ipoib/inet_lro.c | 625 +++++++++++++++++++++++++++
drivers/infiniband/ulp/ipoib/ipoib_ethtool.c | 13
- 3 files changed, 607 insertions(+), 11 deletions(-)
+ 3 files changed, 630 insertions(+), 11 deletions(-)
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile
===================================================================
---- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/Makefile
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile
+--- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/Makefile 2008-09-24 21:36:07.000000000 +0300
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile 2008-09-24 21:36:49.000000000 +0300
@@ -5,7 +5,8 @@ ib_ipoib-y := ipoib_main.o \
ipoib_multicast.o \
ipoib_verbs.o \
@@ -20,9 +20,9 @@
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c
===================================================================
---- /dev/null
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c
-@@ -0,0 +1,602 @@
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c 2008-09-24 21:56:31.000000000 +0300
+@@ -0,0 +1,625 @@
+/*
+ * linux/net/ipv4/inet_lro.c
+ *
@@ -154,6 +154,29 @@
+ lro_desc->data_csum);
+}
+
++#ifdef __ia64__
++static unsigned int
++static_csum_tcpudp_nofold (unsigned long saddr, unsigned long daddr, unsigned short len,
++ unsigned short proto, unsigned int sum)
++{
++ unsigned long result;
++
++ result = (saddr + daddr + sum +
++ ((unsigned long) ntohs(len) << 16) +
++ ((unsigned long) proto << 8));
++
++ /* Fold down to 32-bits so we don't lose in the typedef-less network stack. */
++ /* 64 to 33 */
++ result = (result & 0xffffffff) + (result >> 32);
++ /* 33 to 32 */
++ result = (result & 0xffffffff) + (result >> 32);
++ return result;
++}
++#define CSUM_TCPUDP_NOFOLD static_csum_tcpudp_nofold
++#else
++#define CSUM_TCPUDP_NOFOLD csum_tcpudp_nofold
++#endif
++
+static __wsum lro_tcp_data_csum(struct iphdr *iph, struct tcphdr *tcph, int len)
+{
+ __wsum tcp_csum;
@@ -163,7 +186,7 @@
+ tcp_csum = ~csum_unfold(tcph->check);
+ tcp_hdr_csum = csum_partial((u8 *)tcph, TCP_HDR_LEN(tcph), tcp_csum);
+
-+ tcp_ps_hdr_csum = csum_tcpudp_nofold(iph->saddr, iph->daddr,
++ tcp_ps_hdr_csum = CSUM_TCPUDP_NOFOLD(iph->saddr, iph->daddr,
+ len + TCP_HDR_LEN(tcph),
+ IPPROTO_TCP, 0);
+
@@ -627,8 +650,8 @@
+EXPORT_SYMBOL(lro_flush_pkt);
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
===================================================================
---- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
+--- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c 2008-09-24 21:36:07.000000000 +0300
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c 2008-09-24 21:36:49.000000000 +0300
@@ -100,14 +100,9 @@ static void ipoib_get_strings(struct net
}
}
diff -urN a/kernel_patches/backport/2.6.9_U7/ipoib_lro_to_2.6.23.patch b/kernel_patches/backport/2.6.9_U7/ipoib_lro_to_2.6.23.patch
--- a/kernel_patches/backport/2.6.9_U7/ipoib_lro_to_2.6.23.patch 2008-09-24 21:26:46.000000000 +0300
+++ b/kernel_patches/backport/2.6.9_U7/ipoib_lro_to_2.6.23.patch 2008-09-25 20:41:16.000000000 +0300
@@ -1,13 +1,13 @@
---
drivers/infiniband/ulp/ipoib/Makefile | 3
- drivers/infiniband/ulp/ipoib/inet_lro.c | 602 +++++++++++++++++++++++++++
+ drivers/infiniband/ulp/ipoib/inet_lro.c | 625 +++++++++++++++++++++++++++
drivers/infiniband/ulp/ipoib/ipoib_ethtool.c | 13
- 3 files changed, 607 insertions(+), 11 deletions(-)
+ 3 files changed, 630 insertions(+), 11 deletions(-)
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile
===================================================================
---- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/Makefile
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile
+--- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/Makefile 2008-09-24 21:36:07.000000000 +0300
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/Makefile 2008-09-24 21:36:49.000000000 +0300
@@ -5,7 +5,8 @@ ib_ipoib-y := ipoib_main.o \
ipoib_multicast.o \
ipoib_verbs.o \
@@ -20,9 +20,9 @@
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c
===================================================================
---- /dev/null
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c
-@@ -0,0 +1,602 @@
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/inet_lro.c 2008-09-24 21:56:31.000000000 +0300
+@@ -0,0 +1,625 @@
+/*
+ * linux/net/ipv4/inet_lro.c
+ *
@@ -154,6 +154,29 @@
+ lro_desc->data_csum);
+}
+
++#ifdef __ia64__
++static unsigned int
++static_csum_tcpudp_nofold (unsigned long saddr, unsigned long daddr, unsigned short len,
++ unsigned short proto, unsigned int sum)
++{
++ unsigned long result;
++
++ result = (saddr + daddr + sum +
++ ((unsigned long) ntohs(len) << 16) +
++ ((unsigned long) proto << 8));
++
++ /* Fold down to 32-bits so we don't lose in the typedef-less network stack. */
++ /* 64 to 33 */
++ result = (result & 0xffffffff) + (result >> 32);
++ /* 33 to 32 */
++ result = (result & 0xffffffff) + (result >> 32);
++ return result;
++}
++#define CSUM_TCPUDP_NOFOLD static_csum_tcpudp_nofold
++#else
++#define CSUM_TCPUDP_NOFOLD csum_tcpudp_nofold
++#endif
++
+static __wsum lro_tcp_data_csum(struct iphdr *iph, struct tcphdr *tcph, int len)
+{
+ __wsum tcp_csum;
@@ -163,7 +186,7 @@
+ tcp_csum = ~csum_unfold(tcph->check);
+ tcp_hdr_csum = csum_partial((u8 *)tcph, TCP_HDR_LEN(tcph), tcp_csum);
+
-+ tcp_ps_hdr_csum = csum_tcpudp_nofold(iph->saddr, iph->daddr,
++ tcp_ps_hdr_csum = CSUM_TCPUDP_NOFOLD(iph->saddr, iph->daddr,
+ len + TCP_HDR_LEN(tcph),
+ IPPROTO_TCP, 0);
+
@@ -627,8 +650,8 @@
+EXPORT_SYMBOL(lro_flush_pkt);
Index: ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
===================================================================
---- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
-+++ ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
+--- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c 2008-09-24 21:36:07.000000000 +0300
++++ ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c 2008-09-24 21:36:49.000000000 +0300
@@ -100,14 +100,9 @@ static void ipoib_get_strings(struct net
}
}
--Yossi
More information about the ewg
mailing list