All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net]tg3: Clear NETIF_F_TSO6 flag before doing software GSO
@ 2014-06-19  1:38 Prashant Sreedharan
  2014-06-20  3:56 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Prashant Sreedharan @ 2014-06-19  1:38 UTC (permalink / raw)
  To: davem; +Cc: netdev, Prashant Sreedharan, Michael Chan

Commit d3f6f3a1d818410c17445bce4f4caab52eb102f1 "tg3: Prevent page
allocation failure during TSO workaround" modified driver logic
to use tg3_tso_bug() for any TSO fragment that hits hardware bug
conditions thus the patch increased the scope of work for tg3_tso_bug()
to cover devices that support NETIF_F_TSO6 as well. Prior to the
patch, tg3_tso_bug() would only be used on devices supporting
NETIF_F_TSO.

A regression was introduced for IPv6 packets requiring the workaround.
To properly perform GSO on SKBs with TCPV6 gso_type, we need to call
skb_gso_segment() with NETIF_F_TSO6 feature flag cleared, or the
function will return NULL and cause a kernel oops as tg3 is not handling
a NULL return value. This patch fixes the problem.

Signed-off-by: Prashant Sreedharan <prashant@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
---
 drivers/net/ethernet/broadcom/tg3.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index cd92c49..ccb0023 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -7859,8 +7859,8 @@ static int tg3_tso_bug(struct tg3 *tp, struct sk_buff *skb)
 		netif_wake_queue(tp->dev);
 	}
 
-	segs = skb_gso_segment(skb, tp->dev->features & ~NETIF_F_TSO);
-	if (IS_ERR(segs))
+	segs = skb_gso_segment(skb, tp->dev->features & ~(NETIF_F_TSO | NETIF_F_TSO6));
+	if (IS_ERR(segs) || !segs)
 		goto tg3_tso_bug_end;
 
 	do {
-- 
1.7.1

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

* Re: [PATCH net]tg3: Clear NETIF_F_TSO6 flag before doing software GSO
  2014-06-19  1:38 [PATCH net]tg3: Clear NETIF_F_TSO6 flag before doing software GSO Prashant Sreedharan
@ 2014-06-20  3:56 ` David Miller
  2014-06-20  5:11   ` Michael Chan
  0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2014-06-20  3:56 UTC (permalink / raw)
  To: prashant; +Cc: netdev, mchan

From: Prashant Sreedharan <prashant@broadcom.com>
Date: Wed, 18 Jun 2014 18:38:13 -0700

> Commit d3f6f3a1d818410c17445bce4f4caab52eb102f1 "tg3: Prevent page
> allocation failure during TSO workaround" modified driver logic
> to use tg3_tso_bug() for any TSO fragment that hits hardware bug
> conditions thus the patch increased the scope of work for tg3_tso_bug()
> to cover devices that support NETIF_F_TSO6 as well. Prior to the
> patch, tg3_tso_bug() would only be used on devices supporting
> NETIF_F_TSO.
> 
> A regression was introduced for IPv6 packets requiring the workaround.
> To properly perform GSO on SKBs with TCPV6 gso_type, we need to call
> skb_gso_segment() with NETIF_F_TSO6 feature flag cleared, or the
> function will return NULL and cause a kernel oops as tg3 is not handling
> a NULL return value. This patch fixes the problem.
> 
> Signed-off-by: Prashant Sreedharan <prashant@broadcom.com>
> Signed-off-by: Michael Chan <mchan@broadcom.com>

Applied and queued up for -stable, thanks.

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

* Re: [PATCH net]tg3: Clear NETIF_F_TSO6 flag before doing software GSO
  2014-06-20  3:56 ` David Miller
@ 2014-06-20  5:11   ` Michael Chan
  2014-06-20 23:30     ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Chan @ 2014-06-20  5:11 UTC (permalink / raw)
  To: David Miller; +Cc: prashant, netdev

On Thu, 2014-06-19 at 20:56 -0700, David Miller wrote: 
> From: Prashant Sreedharan <prashant@broadcom.com>
> Date: Wed, 18 Jun 2014 18:38:13 -0700
> 
> > Commit d3f6f3a1d818410c17445bce4f4caab52eb102f1 "tg3: Prevent page
> > allocation failure during TSO workaround" modified driver logic
> > to use tg3_tso_bug() for any TSO fragment that hits hardware bug
> > conditions thus the patch increased the scope of work for tg3_tso_bug()
> > to cover devices that support NETIF_F_TSO6 as well. Prior to the
> > patch, tg3_tso_bug() would only be used on devices supporting
> > NETIF_F_TSO.
> > 
> > A regression was introduced for IPv6 packets requiring the workaround.
> > To properly perform GSO on SKBs with TCPV6 gso_type, we need to call
> > skb_gso_segment() with NETIF_F_TSO6 feature flag cleared, or the
> > function will return NULL and cause a kernel oops as tg3 is not handling
> > a NULL return value. This patch fixes the problem.
> > 
> > Signed-off-by: Prashant Sreedharan <prashant@broadcom.com>
> > Signed-off-by: Michael Chan <mchan@broadcom.com>
> 
> Applied and queued up for -stable, thanks.

David, the regression is only in the net tree.  It doesn't hurt to send
the patch to -stable, but not necessary.

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

* Re: [PATCH net]tg3: Clear NETIF_F_TSO6 flag before doing software GSO
  2014-06-20  5:11   ` Michael Chan
@ 2014-06-20 23:30     ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2014-06-20 23:30 UTC (permalink / raw)
  To: mchan; +Cc: prashant, netdev

From: Michael Chan <mchan@broadcom.com>
Date: Thu, 19 Jun 2014 22:11:25 -0700

> David, the regression is only in the net tree.  It doesn't hurt to send
> the patch to -stable, but not necessary.

Ok, I've dequeued it.

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

end of thread, other threads:[~2014-06-20 23:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-19  1:38 [PATCH net]tg3: Clear NETIF_F_TSO6 flag before doing software GSO Prashant Sreedharan
2014-06-20  3:56 ` David Miller
2014-06-20  5:11   ` Michael Chan
2014-06-20 23:30     ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.