aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tg3.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2007-06-27 03:47:37 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-07-11 01:15:52 -0400
commitd212f87b068c9d72065ef579d85b5ee6b8b59381 (patch)
treea194d5c667c277c7ea5392c9cf97857a0cd1d321 /drivers/net/tg3.c
parentd3d6dd3adaaad71eae20902ed81808a66a40a5b9 (diff)
[NET]: IPV6 checksum offloading in network devices
The existing model for checksum offload does not correctly handle devices that can offload IPV4 and IPV6 only. The NETIF_F_HW_CSUM flag implies device can do any arbitrary protocol. This patch: * adds NETIF_F_IPV6_CSUM for those devices * fixes bnx2 and tg3 devices that need it * add NETIF_F_IPV6_CSUM to ipv6 output (incl GSO) * fixes assumptions about NETIF_F_ALL_CSUM in nat * adjusts bridge union of checksumming computation Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r--drivers/net/tg3.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 2f3184184ad9..3a43426ced32 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -11944,12 +11944,11 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
11944 * checksumming. 11944 * checksumming.
11945 */ 11945 */
11946 if ((tp->tg3_flags & TG3_FLAG_BROKEN_CHECKSUMS) == 0) { 11946 if ((tp->tg3_flags & TG3_FLAG_BROKEN_CHECKSUMS) == 0) {
11947 dev->features |= NETIF_F_IP_CSUM | NETIF_F_SG;
11947 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 || 11948 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 ||
11948 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787) 11949 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787)
11949 dev->features |= NETIF_F_HW_CSUM; 11950 dev->features |= NETIF_F_IPV6_CSUM;
11950 else 11951
11951 dev->features |= NETIF_F_IP_CSUM;
11952 dev->features |= NETIF_F_SG;
11953 tp->tg3_flags |= TG3_FLAG_RX_CHECKSUMS; 11952 tp->tg3_flags |= TG3_FLAG_RX_CHECKSUMS;
11954 } else 11953 } else
11955 tp->tg3_flags &= ~TG3_FLAG_RX_CHECKSUMS; 11954 tp->tg3_flags &= ~TG3_FLAG_RX_CHECKSUMS;