netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next-2.6 PATCH] Fix IPv6 GSO type checks in Intel ethernet drivers
@ 2010-01-23  9:24 Jeff Kirsher
  2010-01-23  9:27 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Jeff Kirsher @ 2010-01-23  9:24 UTC (permalink / raw)
  To: davem; +Cc: netdev, gospo, Sridhar Samudrala, Jeff Kirsher

From: Sridhar Samudrala <sri@us.ibm.com>

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@us.ibm.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 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 +-
 drivers/net/ixgbevf/ixgbevf_main.c |    2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index 3d57ca5..2353e95 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -3771,7 +3771,7 @@ static int e1000_tso(struct e1000_adapter *adapter,
 		                                         0, IPPROTO_TCP, 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,
 		                                       &ipv6_hdr(skb)->daddr,
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index d967949..d4bbdf0 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -3422,7 +3422,7 @@ static inline int igb_tso_adv(struct igb_ring *tx_ring,
 							 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,
diff --git a/drivers/net/igbvf/netdev.c b/drivers/net/igbvf/netdev.c
index a6c3920..ce33671 100644
--- a/drivers/net/igbvf/netdev.c
+++ b/drivers/net/igbvf/netdev.c
@@ -1963,7 +1963,7 @@ static int igbvf_tso(struct igbvf_adapter *adapter,
 		                                         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,
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 81971ed..b2c0025 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -5113,7 +5113,7 @@ static int ixgbe_tso(struct ixgbe_adapter *adapter,
 			                                         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,
diff --git a/drivers/net/ixgbevf/ixgbevf_main.c b/drivers/net/ixgbevf/ixgbevf_main.c
index 39544af..652b6f4 100644
--- a/drivers/net/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ixgbevf/ixgbevf_main.c
@@ -2756,7 +2756,7 @@ static int ixgbevf_tso(struct ixgbevf_adapter *adapter,
 								 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,


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [net-next-2.6 PATCH] Fix IPv6 GSO type checks in Intel ethernet drivers
  2010-01-23  9:24 [net-next-2.6 PATCH] Fix IPv6 GSO type checks in Intel ethernet drivers Jeff Kirsher
@ 2010-01-23  9:27 ` David Miller
  2010-01-23  9:31   ` Jeff Kirsher
  2010-01-23 14:52   ` Ben Hutchings
  0 siblings, 2 replies; 4+ messages in thread
From: David Miller @ 2010-01-23  9:27 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, gospo, sri

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Sat, 23 Jan 2010 01:24:45 -0800

> From: Sridhar Samudrala <sri@us.ibm.com>
> 
> 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@us.ibm.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

This is definitely net-2.6 material, the bug definitely exists
there and besides the ixgbevf bit, this patch applies cleanly
to net-2.6 as well.

Please spin two patches, one which gets everything in net-2.6
and one which hits ixgbevf in net-next-2.6

Thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [net-next-2.6 PATCH] Fix IPv6 GSO type checks in Intel ethernet drivers
  2010-01-23  9:27 ` David Miller
@ 2010-01-23  9:31   ` Jeff Kirsher
  2010-01-23 14:52   ` Ben Hutchings
  1 sibling, 0 replies; 4+ messages in thread
From: Jeff Kirsher @ 2010-01-23  9:31 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, gospo, sri

On Sat, Jan 23, 2010 at 01:27, David Miller <davem@davemloft.net> wrote:
> From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Date: Sat, 23 Jan 2010 01:24:45 -0800
>
>> From: Sridhar Samudrala <sri@us.ibm.com>
>>
>> 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@us.ibm.com>
>> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>
> This is definitely net-2.6 material, the bug definitely exists
> there and besides the ixgbevf bit, this patch applies cleanly
> to net-2.6 as well.
>
> Please spin two patches, one which gets everything in net-2.6
> and one which hits ixgbevf in net-next-2.6
>
> Thanks.
> --

Thanks Dave, I will work up the two patches now.

-- 
Cheers,
Jeff

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [net-next-2.6 PATCH] Fix IPv6 GSO type checks in Intel ethernet drivers
  2010-01-23  9:27 ` David Miller
  2010-01-23  9:31   ` Jeff Kirsher
@ 2010-01-23 14:52   ` Ben Hutchings
  1 sibling, 0 replies; 4+ messages in thread
From: Ben Hutchings @ 2010-01-23 14:52 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, gospo, sri, David Miller

[-- Attachment #1: Type: text/plain, Size: 983 bytes --]

On Sat, 2010-01-23 at 01:27 -0800, David Miller wrote:
> From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Date: Sat, 23 Jan 2010 01:24:45 -0800
> 
> > From: Sridhar Samudrala <sri@us.ibm.com>
> > 
> > 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@us.ibm.com>
> > Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> 
> This is definitely net-2.6 material, the bug definitely exists
> there and besides the ixgbevf bit, this patch applies cleanly
> to net-2.6 as well.

This is presumably suitable for stable as well; if so, please cc
stable@kernel.org.

Ben.

-- 
Ben Hutchings
Any smoothly functioning technology is indistinguishable from a rigged demo.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-01-23 14:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-23  9:24 [net-next-2.6 PATCH] Fix IPv6 GSO type checks in Intel ethernet drivers Jeff Kirsher
2010-01-23  9:27 ` David Miller
2010-01-23  9:31   ` Jeff Kirsher
2010-01-23 14:52   ` Ben Hutchings

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).