]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net: enetc: add UDP segmentation offload support
authorWei Fang <wei.fang@nxp.com>
Thu, 19 Dec 2024 05:47:55 +0000 (13:47 +0800)
committerJakub Kicinski <kuba@kernel.org>
Mon, 23 Dec 2024 17:54:33 +0000 (09:54 -0800)
Set NETIF_F_GSO_UDP_L4 bit of hw_features and features because i.MX95
enetc and LS1028A driver implements UDP segmentation.

- i.MX95 ENETC supports UDP segmentation via LSO.
- LS1028A ENETC supports UDP segmentation since the commit 3d5b459ba0e3
("net: tso: add UDP segmentation support").

Signed-off-by: Wei Fang <wei.fang@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20241219054755.1615626-5-wei.fang@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/freescale/enetc/enetc_pf_common.c
drivers/net/ethernet/freescale/enetc/enetc_vf.c

index 31dedc665a16594aea61d0ec9136fab9f9afe8f0..3fd9b07278757428a985a3214ec7b43037b870ec 100644 (file)
@@ -110,11 +110,13 @@ void enetc_pf_netdev_setup(struct enetc_si *si, struct net_device *ndev,
        ndev->hw_features = NETIF_F_SG | NETIF_F_RXCSUM |
                            NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX |
                            NETIF_F_HW_VLAN_CTAG_FILTER | NETIF_F_LOOPBACK |
-                           NETIF_F_HW_CSUM | NETIF_F_TSO | NETIF_F_TSO6;
+                           NETIF_F_HW_CSUM | NETIF_F_TSO | NETIF_F_TSO6 |
+                           NETIF_F_GSO_UDP_L4;
        ndev->features = NETIF_F_HIGHDMA | NETIF_F_SG | NETIF_F_RXCSUM |
                         NETIF_F_HW_VLAN_CTAG_TX |
                         NETIF_F_HW_VLAN_CTAG_RX |
-                        NETIF_F_HW_CSUM | NETIF_F_TSO | NETIF_F_TSO6;
+                        NETIF_F_HW_CSUM | NETIF_F_TSO | NETIF_F_TSO6 |
+                        NETIF_F_GSO_UDP_L4;
        ndev->vlan_features = NETIF_F_SG | NETIF_F_HW_CSUM |
                              NETIF_F_TSO | NETIF_F_TSO6;
 
index 63d78b2b8670931dcb40f7b54c954ae691d286eb..3768752b6008b37eeccfddce3587d33904195e26 100644 (file)
@@ -145,11 +145,13 @@ static void enetc_vf_netdev_setup(struct enetc_si *si, struct net_device *ndev,
        ndev->hw_features = NETIF_F_SG | NETIF_F_RXCSUM |
                            NETIF_F_HW_VLAN_CTAG_TX |
                            NETIF_F_HW_VLAN_CTAG_RX |
-                           NETIF_F_HW_CSUM | NETIF_F_TSO | NETIF_F_TSO6;
+                           NETIF_F_HW_CSUM | NETIF_F_TSO | NETIF_F_TSO6 |
+                           NETIF_F_GSO_UDP_L4;
        ndev->features = NETIF_F_HIGHDMA | NETIF_F_SG | NETIF_F_RXCSUM |
                         NETIF_F_HW_VLAN_CTAG_TX |
                         NETIF_F_HW_VLAN_CTAG_RX |
-                        NETIF_F_HW_CSUM | NETIF_F_TSO | NETIF_F_TSO6;
+                        NETIF_F_HW_CSUM | NETIF_F_TSO | NETIF_F_TSO6 |
+                        NETIF_F_GSO_UDP_L4;
        ndev->vlan_features = NETIF_F_SG | NETIF_F_HW_CSUM |
                              NETIF_F_TSO | NETIF_F_TSO6;