]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
geneve: add NETIF_F_FRAGLIST flag for dev features
authorXin Long <lucien.xin@gmail.com>
Fri, 15 Jan 2021 09:47:46 +0000 (17:47 +0800)
committerJakub Kicinski <kuba@kernel.org>
Tue, 19 Jan 2021 03:57:02 +0000 (19:57 -0800)
Some protocol HW GSO requires fraglist supported by the device, like
SCTP. Without NETIF_F_FRAGLIST set in the dev features of geneve, it
would have to do SW GSO before the packets enter the driver, even
when the geneve dev and lower dev (like veth) both have the feature
of NETIF_F_GSO_SCTP.

So this patch is to add it for geneve.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/geneve.c

index 6aa775d60c575cc54e61ea779a26d05361857d64..4ac0373326efd995171b1179bd7a5e7a202b89a2 100644 (file)
@@ -1197,11 +1197,12 @@ static void geneve_setup(struct net_device *dev)
        SET_NETDEV_DEVTYPE(dev, &geneve_type);
 
        dev->features    |= NETIF_F_LLTX;
-       dev->features    |= NETIF_F_SG | NETIF_F_HW_CSUM;
+       dev->features    |= NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_FRAGLIST;
        dev->features    |= NETIF_F_RXCSUM;
        dev->features    |= NETIF_F_GSO_SOFTWARE;
 
-       dev->hw_features |= NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_RXCSUM;
+       dev->hw_features |= NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_FRAGLIST;
+       dev->hw_features |= NETIF_F_RXCSUM;
        dev->hw_features |= NETIF_F_GSO_SOFTWARE;
 
        /* MTU range: 68 - (something less than 65535) */