[kernel] r18053 - in dists/squeeze/linux-2.6/debian: . patches/bugfix/all patches/features/all/e1000e patches/features/all/igb patches/series

Ben Hutchings benh at alioth.debian.org
Mon Sep 5 04:08:09 UTC 2011


Author: benh
Date: Mon Sep  5 04:08:07 2011
New Revision: 18053

Log:
Fix bugs in IPv6 forwarding with GRO/GSO (Closes: #630730)

e1000e,igb,igbvf,ixgbe: Fix IPv6 GSO type checks
ipv6: Add GSO support on forwarding path

Added:
   dists/squeeze/linux-2.6/debian/patches/bugfix/all/ipv6-add-gso-support-on-forwarding-path.patch
   dists/squeeze/linux-2.6/debian/patches/bugfix/all/net-fix-ipv6-gso-type-checks-in-intel-ethernet-drivers.patch
Deleted:
   dists/squeeze/linux-2.6/debian/patches/features/all/e1000e/0057-net-Fix-IPv6-GSO-type-checks-in-Intel-ethernet-drive.patch
   dists/squeeze/linux-2.6/debian/patches/features/all/igb/0088-net-Fix-IPv6-GSO-type-checks-in-Intel-ethernet-drive.patch
Modified:
   dists/squeeze/linux-2.6/debian/changelog
   dists/squeeze/linux-2.6/debian/patches/series/36

Modified: dists/squeeze/linux-2.6/debian/changelog
==============================================================================
--- dists/squeeze/linux-2.6/debian/changelog	Mon Sep  5 03:59:02 2011	(r18052)
+++ dists/squeeze/linux-2.6/debian/changelog	Mon Sep  5 04:08:07 2011	(r18053)
@@ -87,6 +87,9 @@
   * sched: Work around sched_group::cpu_power == 0 (Ameliorates: #636797)
   * [x86] Revert "x86, hotplug: Use mwait to offline a processor, fix the
     legacy case" (Closes: #622259)
+  * Fix bugs in IPv6 forwarding with GRO/GSO (Closes: #630730):
+    - e1000e,igb,igbvf,ixgbe: Fix IPv6 GSO type checks
+    - ipv6: Add GSO support on forwarding path
 
  -- maximilian attems <maks at debian.org>  Sat, 25 Jun 2011 10:22:27 +0200
 

Added: dists/squeeze/linux-2.6/debian/patches/bugfix/all/ipv6-add-gso-support-on-forwarding-path.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/squeeze/linux-2.6/debian/patches/bugfix/all/ipv6-add-gso-support-on-forwarding-path.patch	Mon Sep  5 04:08:07 2011	(r18053)
@@ -0,0 +1,41 @@
+From: Herbert Xu <herbert at gondor.apana.org.au>
+Date: Thu, 27 May 2010 16:14:30 -0700
+Subject: ipv6: Add GSO support on forwarding path
+
+From: Herbert Xu <herbert at gondor.apana.org.au>
+
+commit 0aa68271510ae2b221d4b60892103837be63afe4 upstream.
+
+Currently we disallow GSO packets on the IPv6 forward path.
+This patch fixes this.
+
+Note that I discovered that our existing GSO MTU checks (e.g.,
+IPv4 forwarding) are buggy in that they skip the check altogether,
+when they really should be checking gso_size + header instead.
+
+I have also been lazy here in that I haven't bothered to segment
+the GSO packet by hand before generating an ICMP message.  Someone
+should add that to be 100% correct.
+
+Reported-by: Ralf Baechle <ralf at linux-mips.org>
+Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+Signed-off-by: Apollon Oikonomopoulos <apoikos at gmail.com>
+Signed-off-by: Faidon Liambotis <paravoid at debian.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
+
+---
+ net/ipv6/ip6_output.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/net/ipv6/ip6_output.c
++++ b/net/ipv6/ip6_output.c
+@@ -510,7 +510,7 @@ int ip6_forward(struct sk_buff *skb)
+ 		}
+ 	}
+ 
+-	if (skb->len > dst_mtu(dst)) {
++	if (skb->len > dst_mtu(dst) && !skb_is_gso(skb)) {
+ 		/* Again, force OUTPUT device used as source address */
+ 		skb->dev = dst->dev;
+ 		icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, dst_mtu(dst), skb->dev);

Added: dists/squeeze/linux-2.6/debian/patches/bugfix/all/net-fix-ipv6-gso-type-checks-in-intel-ethernet-drivers.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/squeeze/linux-2.6/debian/patches/bugfix/all/net-fix-ipv6-gso-type-checks-in-intel-ethernet-drivers.patch	Mon Sep  5 04:08:07 2011	(r18053)
@@ -0,0 +1,72 @@
+From: Sridhar Samudrala <sri at us.ibm.com>
+Date: Sat, 23 Jan 2010 02:02:21 -0800
+Subject: net: Fix IPv6 GSO type checks in Intel ethernet drivers
+
+From: Sridhar Samudrala <sri at us.ibm.com>
+
+commit 8e1e8a4779cb23c1d9f51e9223795e07ec54d77a upstream.
+
+Found this problem when testing IPv6 from a KVM guest to a remote
+host via e1000e device on the host.
+The following patch fixes the check for IPv6 GSO packet in Intel
+ethernet drivers to use skb_is_gso_v6(). SKB_GSO_DODGY is also set
+when packets are forwarded from a guest.
+
+Signed-off-by: Sridhar Samudrala <sri at us.ibm.com>
+Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher at intel.com>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+Signed-off-by: Faidon Liambotis <paravoid at debian.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
+
+
+---
+ drivers/net/e1000e/netdev.c    |    2 +-
+ drivers/net/igb/igb_main.c     |    2 +-
+ drivers/net/igbvf/netdev.c     |    2 +-
+ drivers/net/ixgbe/ixgbe_main.c |    2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+--- a/drivers/net/e1000e/netdev.c
++++ b/drivers/net/e1000e/netdev.c
+@@ -3807,7 +3807,7 @@ static int e1000_tso(struct e1000_adapte
+ 								 0);
+ 			cmd_length = E1000_TXD_CMD_IP;
+ 			ipcse = skb_transport_offset(skb) - 1;
+-		} else if (skb_shinfo(skb)->gso_type == SKB_GSO_TCPV6) {
++		} else if (skb_is_gso_v6(skb)) {
+ 			ipv6_hdr(skb)->payload_len = 0;
+ 			tcp_hdr(skb)->check =
+ 				~csum_ipv6_magic(&ipv6_hdr(skb)->saddr,
+--- a/drivers/net/igb/igb_main.c
++++ b/drivers/net/igb/igb_main.c
+@@ -3032,7 +3032,7 @@ static inline int igb_tso_adv(struct igb
+ 							 iph->daddr, 0,
+ 							 IPPROTO_TCP,
+ 							 0);
+-	} else if (skb_shinfo(skb)->gso_type == SKB_GSO_TCPV6) {
++	} else if (skb_is_gso_v6(skb)) {
+ 		ipv6_hdr(skb)->payload_len = 0;
+ 		tcp_hdr(skb)->check = ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr,
+ 						       &ipv6_hdr(skb)->daddr,
+--- a/drivers/net/igbvf/netdev.c
++++ b/drivers/net/igbvf/netdev.c
+@@ -1953,7 +1953,7 @@ static int igbvf_tso(struct igbvf_adapte
+ 		                                         iph->daddr, 0,
+ 		                                         IPPROTO_TCP,
+ 		                                         0);
+-	} else if (skb_shinfo(skb)->gso_type == SKB_GSO_TCPV6) {
++	} else if (skb_is_gso_v6(skb)) {
+ 		ipv6_hdr(skb)->payload_len = 0;
+ 		tcp_hdr(skb)->check = ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr,
+ 		                                       &ipv6_hdr(skb)->daddr,
+--- a/drivers/net/ixgbe/ixgbe_main.c
++++ b/drivers/net/ixgbe/ixgbe_main.c
+@@ -4881,7 +4881,7 @@ static int ixgbe_tso(struct ixgbe_adapte
+ 			                                         IPPROTO_TCP,
+ 			                                         0);
+ 			adapter->hw_tso_ctxt++;
+-		} else if (skb_shinfo(skb)->gso_type == SKB_GSO_TCPV6) {
++		} else if (skb_is_gso_v6(skb)) {
+ 			ipv6_hdr(skb)->payload_len = 0;
+ 			tcp_hdr(skb)->check =
+ 			    ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr,

Modified: dists/squeeze/linux-2.6/debian/patches/series/36
==============================================================================
--- dists/squeeze/linux-2.6/debian/patches/series/36	Mon Sep  5 03:59:02 2011	(r18052)
+++ dists/squeeze/linux-2.6/debian/patches/series/36	Mon Sep  5 04:08:07 2011	(r18053)
@@ -80,7 +80,6 @@
 + features/all/e1000e/0054-e1000e-provide-MAC-family-specific-function-to-set-L.patch
 + features/all/e1000e/0055-e1000e-genericize-the-update-multicast-address-list.patch
 + features/all/e1000e/0056-e1000-e1000e-igb-igbvf-ixgb-ixgbe-Fix-tests-of-unsig.patch
-+ features/all/e1000e/0057-net-Fix-IPv6-GSO-type-checks-in-Intel-ethernet-drive.patch
 + features/all/e1000e/0058-e1000e-Fix-namespace-conflicts-wrt.-e1000_has_link.patch
 + features/all/e1000e/0059-net-e1000e-convert-to-use-mc-helpers.patch
 + features/all/e1000e/0060-tree-wide-Assorted-spelling-fixes.patch
@@ -278,7 +277,6 @@
 + features/all/igb/0085-igb-add-support-for-device-reset-interrupt.patch
 + features/all/igb/0086-e1000-e1000e-igb-igbvf-ixgb-ixgbe-Fix-tests-of-unsig.patch
 + features/all/igb/0087-igb-igbvf-cleanup-exception-handling-in-tx_map_adv.patch
-+ features/all/igb/0088-net-Fix-IPv6-GSO-type-checks-in-Intel-ethernet-drive.patch
 + features/all/igb/0089-igbvf-fix-issue-w-mapped_as_page-being-left-set-afte.patch
 + features/all/igb/0090-igb-make-certain-to-reassign-legacy-interrupt-vector.patch
 + features/all/igb/0091-tree-wide-Assorted-spelling-fixes.patch



More information about the Kernel-svn-changes mailing list