sunvnet: restrict advertized checksum offloads to just IP
authorShannon Nelson <shannon.nelson@oracle.com>
Wed, 14 Jun 2017 22:43:37 +0000 (15:43 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 15 Jun 2017 18:22:43 +0000 (14:22 -0400)
As much as we'd like to play well with others, we really aren't
handling the checksums on non-IP protocol packets very well.  This
is easily seen when trying to do TCP over ipv6 - the checksums are
garbage.

Here we restrict the checksum feature flag to just IP traffic so
that we aren't given work we can't yet do.

Orabug: 2617539126259755

Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sun/ldmvsw.c
drivers/net/ethernet/sun/sunvnet.c

index 5b56c24b6ed2e0c45b5a40d32941527bb1539390..8603e397097edd48bc1b1afff00601cbda6762c8 100644 (file)
@@ -248,7 +248,7 @@ static struct net_device *vsw_alloc_netdev(u8 hwaddr[],
        dev->ethtool_ops = &vsw_ethtool_ops;
        dev->watchdog_timeo = VSW_TX_TIMEOUT;
 
-       dev->hw_features = NETIF_F_HW_CSUM | NETIF_F_SG;
+       dev->hw_features = NETIF_F_IP_CSUM | NETIF_F_SG;
        dev->features = dev->hw_features;
 
        /* MTU range: 68 - 65535 */
index 0b95105f706007ae9e0ff4325ea9983f9d514ee4..75b167e3fe98ad3fd6613d59a55d2f697014f4dc 100644 (file)
@@ -312,7 +312,7 @@ static struct vnet *vnet_new(const u64 *local_mac,
        dev->watchdog_timeo = VNET_TX_TIMEOUT;
 
        dev->hw_features = NETIF_F_TSO | NETIF_F_GSO | NETIF_F_GSO_SOFTWARE |
-                          NETIF_F_HW_CSUM | NETIF_F_SG;
+                          NETIF_F_IP_CSUM | NETIF_F_SG;
        dev->features = dev->hw_features;
 
        /* MTU range: 68 - 65535 */