From: Brad Peters <bpeters@redhat.com> Date: Tue, 29 Jul 2008 14:53:22 -0400 Subject: [net] modifies inet_lro for RHEL Message-id: 20080729185322.8726.17259.sendpatchset@squad5-lp1.lab.bos.redhat.com O-Subject: [PATCH RHEL 5.3 4/5 v2] Modifies inet_lro and kernel so RH can use this module Bugzilla: 442409 RHBZ#: ====== https://bugzilla.redhat.com/show_bug.cgi?id=442409 Description: =========== This ehea driver supports LRO (Large Receive Offload) and thus depends on the inet_lro module already in mainline kernel. Patch 3 of 5 added that module; this patch (4 of 5) updates the module to work with the RHEL kernel. =============================================================== Brad Peters 1-978-392-1000 x 23183 IBM on-site partner. Proposed Patch: =============== This patch is based on 2.6.18-94.el5 diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index ff8a862..2363497 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -2393,6 +2393,7 @@ config CHELSIO_T3 config EHEA tristate "eHEA Ethernet support" depends on IBMEBUS + select INET_LRO ---help--- This driver supports the IBM pSeries eHEA ethernet adapter. diff --git a/include/linux/inet_lro.h b/include/linux/inet_lro.h index 80335b7..41025c7 100644 --- a/include/linux/inet_lro.h +++ b/include/linux/inet_lro.h @@ -32,6 +32,17 @@ #include <net/tcp.h> /* + * backport csum_unfold and datatypes from 2.6.25 + */ +typedef __u16 __bitwise __sum16; +typedef __u32 __bitwise __wsum; + +static inline __wsum csum_unfold(__sum16 n) +{ + return (__force __wsum)n; +} + +/* * LRO statistics */ diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig index bd14894..a61e87a 100644 --- a/net/ipv4/Kconfig +++ b/net/ipv4/Kconfig @@ -582,5 +582,13 @@ config TCP_CONG_BIC depends on !TCP_CONG_ADVANCED default y +config INET_LRO + tristate "Large Receive Offload (ipv4/tcp)" + + ---help--- + Support for Large Receive Offload (ipv4/tcp). + + If unsure, say Y. + source "net/ipv4/ipvs/Kconfig" diff --git a/net/ipv4/Makefile b/net/ipv4/Makefile index 78867e0..aff6fc9 100644 --- a/net/ipv4/Makefile +++ b/net/ipv4/Makefile @@ -26,6 +26,7 @@ obj-$(CONFIG_SYN_COOKIES) += syncookies.o obj-$(CONFIG_INET_AH) += ah4.o obj-$(CONFIG_INET_ESP) += esp4.o obj-$(CONFIG_INET_IPCOMP) += ipcomp.o +obj-$(CONFIG_INET_LRO) += inet_lro.o obj-$(CONFIG_INET_XFRM_TUNNEL) += xfrm4_tunnel.o obj-$(CONFIG_INET_TUNNEL) += tunnel4.o obj-$(CONFIG_INET_XFRM_MODE_TRANSPORT) += xfrm4_mode_transport.o