Skip to content

Commit c12e82c

Browse files
Wei Fangkuba-moo
authored andcommitted
net: enetc: add UDP segmentation offload support
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 3d5b459 ("net: tso: add UDP segmentation support"). Signed-off-by: Wei Fang <[email protected]> Reviewed-by: Frank Li <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 69797ff commit c12e82c

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

drivers/net/ethernet/freescale/enetc/enetc_pf_common.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,13 @@ void enetc_pf_netdev_setup(struct enetc_si *si, struct net_device *ndev,
110110
ndev->hw_features = NETIF_F_SG | NETIF_F_RXCSUM |
111111
NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX |
112112
NETIF_F_HW_VLAN_CTAG_FILTER | NETIF_F_LOOPBACK |
113-
NETIF_F_HW_CSUM | NETIF_F_TSO | NETIF_F_TSO6;
113+
NETIF_F_HW_CSUM | NETIF_F_TSO | NETIF_F_TSO6 |
114+
NETIF_F_GSO_UDP_L4;
114115
ndev->features = NETIF_F_HIGHDMA | NETIF_F_SG | NETIF_F_RXCSUM |
115116
NETIF_F_HW_VLAN_CTAG_TX |
116117
NETIF_F_HW_VLAN_CTAG_RX |
117-
NETIF_F_HW_CSUM | NETIF_F_TSO | NETIF_F_TSO6;
118+
NETIF_F_HW_CSUM | NETIF_F_TSO | NETIF_F_TSO6 |
119+
NETIF_F_GSO_UDP_L4;
118120
ndev->vlan_features = NETIF_F_SG | NETIF_F_HW_CSUM |
119121
NETIF_F_TSO | NETIF_F_TSO6;
120122

drivers/net/ethernet/freescale/enetc/enetc_vf.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,13 @@ static void enetc_vf_netdev_setup(struct enetc_si *si, struct net_device *ndev,
145145
ndev->hw_features = NETIF_F_SG | NETIF_F_RXCSUM |
146146
NETIF_F_HW_VLAN_CTAG_TX |
147147
NETIF_F_HW_VLAN_CTAG_RX |
148-
NETIF_F_HW_CSUM | NETIF_F_TSO | NETIF_F_TSO6;
148+
NETIF_F_HW_CSUM | NETIF_F_TSO | NETIF_F_TSO6 |
149+
NETIF_F_GSO_UDP_L4;
149150
ndev->features = NETIF_F_HIGHDMA | NETIF_F_SG | NETIF_F_RXCSUM |
150151
NETIF_F_HW_VLAN_CTAG_TX |
151152
NETIF_F_HW_VLAN_CTAG_RX |
152-
NETIF_F_HW_CSUM | NETIF_F_TSO | NETIF_F_TSO6;
153+
NETIF_F_HW_CSUM | NETIF_F_TSO | NETIF_F_TSO6 |
154+
NETIF_F_GSO_UDP_L4;
153155
ndev->vlan_features = NETIF_F_SG | NETIF_F_HW_CSUM |
154156
NETIF_F_TSO | NETIF_F_TSO6;
155157

0 commit comments

Comments
 (0)