Message ID | 20241107033817.1654163-6-wei.fang@nxp.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Add more feautues for ENETC v4 - round 1 | expand |
On Thu, Nov 07, 2024 at 11:38:17AM +0800, Wei Fang wrote: > For LS1028A, the enetc driver implements TCP segmentation via the tso > interfaces provided by the kernel, but since the commit 3d5b459ba0e3 > ("net: tso: add UDP segmentation support"), the LS1028A enetc driver > also supports UDP segmentation. > For i.MX95, the enetc driver implements TCP segmentation via the LSO > feature, and LSO also supports UDP segmentation. > Therefore, setting the NETIF_F_GSO_UDP_L4 bit in the enetc net_device > indicates that enetc supports UDP segmentation offload. Set NETIF_F_GSO_UDP_L4 bit of hw_features because i.MX95 enetc and LS1028A driver implements UDP segmenation. - i.MX95 enetc supports UDP segmentation via LSO. - LS1028A enetc supports UDP segmenation since the commit 3d5b459ba0e3 .... > > Signed-off-by: Wei Fang <wei.fang@nxp.com> > --- > drivers/net/ethernet/freescale/enetc/enetc_pf_common.c | 6 ++++-- > drivers/net/ethernet/freescale/enetc/enetc_vf.c | 6 ++++-- > 2 files changed, 8 insertions(+), 4 deletions(-) > > diff --git a/drivers/net/ethernet/freescale/enetc/enetc_pf_common.c b/drivers/net/ethernet/freescale/enetc/enetc_pf_common.c > index 82a67356abe4..76fc3c6fdec1 100644 > --- a/drivers/net/ethernet/freescale/enetc/enetc_pf_common.c > +++ b/drivers/net/ethernet/freescale/enetc/enetc_pf_common.c > @@ -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; > > diff --git a/drivers/net/ethernet/freescale/enetc/enetc_vf.c b/drivers/net/ethernet/freescale/enetc/enetc_vf.c > index 052833acd220..ba71c04994c4 100644 > --- a/drivers/net/ethernet/freescale/enetc/enetc_vf.c > +++ b/drivers/net/ethernet/freescale/enetc/enetc_vf.c > @@ -138,11 +138,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; > > -- > 2.34.1 >
diff --git a/drivers/net/ethernet/freescale/enetc/enetc_pf_common.c b/drivers/net/ethernet/freescale/enetc/enetc_pf_common.c index 82a67356abe4..76fc3c6fdec1 100644 --- a/drivers/net/ethernet/freescale/enetc/enetc_pf_common.c +++ b/drivers/net/ethernet/freescale/enetc/enetc_pf_common.c @@ -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; diff --git a/drivers/net/ethernet/freescale/enetc/enetc_vf.c b/drivers/net/ethernet/freescale/enetc/enetc_vf.c index 052833acd220..ba71c04994c4 100644 --- a/drivers/net/ethernet/freescale/enetc/enetc_vf.c +++ b/drivers/net/ethernet/freescale/enetc/enetc_vf.c @@ -138,11 +138,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;
For LS1028A, the enetc driver implements TCP segmentation via the tso interfaces provided by the kernel, but since the commit 3d5b459ba0e3 ("net: tso: add UDP segmentation support"), the LS1028A enetc driver also supports UDP segmentation. For i.MX95, the enetc driver implements TCP segmentation via the LSO feature, and LSO also supports UDP segmentation. Therefore, setting the NETIF_F_GSO_UDP_L4 bit in the enetc net_device indicates that enetc supports UDP segmentation offload. Signed-off-by: Wei Fang <wei.fang@nxp.com> --- drivers/net/ethernet/freescale/enetc/enetc_pf_common.c | 6 ++++-- drivers/net/ethernet/freescale/enetc/enetc_vf.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-)