]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
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)
committerAllen Pais <allen.pais@oracle.com>
Sat, 24 Jun 2017 01:27:48 +0000 (06:57 +0530)
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>
(cherry-picked from commit 7e9191c54a36c864b901ea8ce56dc42f10c2f5ae)
Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
Reviewed-by: Jack Vogel <jack.vogel@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
drivers/net/ethernet/sun/ldmvsw.c
drivers/net/ethernet/sun/sunvnet.c

index 8c27e86e57f6521c021f554fd66ab9fce54fdd04..4f849c8cb226d52ed1ef838e7789b945c84b3cc0 100644 (file)
@@ -250,7 +250,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;
 
        SET_NETDEV_DEV(dev, &vdev->dev);
index c2a8daff5e5fbadb095d2dd74b1064c8efbb6479..39c9af46fa5d41231ed50178b716507cf3ebc04e 100644 (file)
@@ -313,7 +313,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;
 
        SET_NETDEV_DEV(dev, &vdev->dev);