tg3: Clear NETIF_F_TSO6 flag before doing software GSO
Subsystems (3)
PATCH 1/1 tg3: Clear NETIF_F_TSO6 flag before doing software GSO
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.
--- drivers/net/ethernet/broadcom/tg3.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/broadcom/tg3.c +2 -2
@@ -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 {
Signature · 1 line
1.7.1
David Miller
maintainerFrom: Prashant Sreedharan <[email protected]>
Date: Wed, 18 Jun 2014 18:38:13 -0700
Quoted 8 lines
Commit
d3f6f3a1d818410c17445bce4f4caab52eb102f1"tg3: Prevent page allocation failure during TSO workaround" modified driver logic to usetg3_tso_bug()for any TSO fragment that hits hardware bug conditions thus the patch increased the scope of work fortg3_tso_bug()to cover devices that supportNETIF_F_TSO6as well. Prior to the patch,tg3_tso_bug()would only be used on devices supportingNETIF_F_TSO.
Quoted 8 lines
A regression was introduced for IPv6 packets requiring the workaround. To properly perform GSO on SKBs with TCPV6
gso_type, we need to callskb_gso_segment()withNETIF_F_TSO6feature 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 <[email protected]>Signed-off-by Michael Chan <[email protected]>
Applied and queued up for -stable, thanks.
Quoted 17 lines · David Miller
From: Prashant Sreedharan <[email protected]>
Date: Wed, 18 Jun 2014 18:38:13 -0700Quoted 14 lines
Commit
d3f6f3a1d818410c17445bce4f4caab52eb102f1"tg3: Prevent page allocation failure during TSO workaround" modified driver logic to usetg3_tso_bug()for any TSO fragment that hits hardware bug conditions thus the patch increased the scope of work fortg3_tso_bug()to cover devices that supportNETIF_F_TSO6as well. Prior to the patch,tg3_tso_bug()would only be used on devices supportingNETIF_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 callskb_gso_segment()withNETIF_F_TSO6feature 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.
Quoted 4 lines
Quoted 2 lines
Signed-off-by Prashant Sreedharan <[email protected]>Signed-off-by Michael Chan <[email protected]>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.
David Miller
maintainerFrom: Michael Chan <[email protected]>
Date: Thu, 19 Jun 2014 22:11:25 -0700
Quoted 2 lines
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.