]> git.baikalelectronics.ru Git - kernel.git/commit
tg3: Clear NETIF_F_TSO6 flag before doing software GSO
authorPrashant Sreedharan <prashant@broadcom.com>
Thu, 19 Jun 2014 01:38:13 +0000 (18:38 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 20 Jun 2014 03:55:49 +0000 (20:55 -0700)
commit1530bff4fbf544b512664ae9e3e69bb3937164cf
treed029ec5177916822721a345c1f1c9c95780b726e
parent03cf0ebce94849db326713c5049693f04d8cc3db
tg3: Clear NETIF_F_TSO6 flag before doing software GSO

Commit 93cb64cb7236815db8517ba25f58d68d3132d734 ("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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/tg3.c