Subject: Re: [PATCH net-next 3/4] net: make drivers set the TSO limit not the GSO limit

From: Simon Horman <[email-masked]>
Date: Fri, 6 May 2022 20:30:03 +0900

On Thu, May 05, 2022 at 07:51:33PM -0700, Jakub Kicinski wrote:
> Drivers should call the TSO setting helper, GSO is controllable
> by user space.
> 
> Signed-off-by: Jakub Kicinski <[email-masked]>

NFP portion:

Reviewed-by: Simon Horman <[email-masked]>

...

> ---
>  drivers/net/bonding/bond_main.c                      | 12 ++++++------
>  drivers/net/ethernet/atheros/atl1e/atl1e_main.c      |  2 +-
>  drivers/net/ethernet/cavium/liquidio/lio_main.c      |  2 +-
>  drivers/net/ethernet/cavium/liquidio/lio_vf_main.c   |  2 +-
>  drivers/net/ethernet/emulex/benet/be_main.c          |  2 +-
>  drivers/net/ethernet/freescale/fec_main.c            |  2 +-
>  drivers/net/ethernet/hisilicon/hns/hns_enet.c        |  4 ++--
>  drivers/net/ethernet/intel/ixgbe/ixgbe_main.c        |  4 ++--
>  drivers/net/ethernet/marvell/mv643xx_eth.c           |  2 +-
>  drivers/net/ethernet/marvell/mvneta.c                |  2 +-
>  drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c      |  2 +-
>  drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c |  2 +-
>  drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c |  2 +-
>  drivers/net/ethernet/netronome/nfp/nfp_net_common.c  |  2 +-
>  drivers/net/ethernet/netronome/nfp/nfp_net_repr.c    |  2 +-
>  drivers/net/ethernet/realtek/r8169_main.c            |  8 ++++----
>  drivers/net/ethernet/sfc/ef100_nic.c                 |  9 ++++++---
>  drivers/net/ethernet/sfc/efx.c                       |  2 +-
>  drivers/net/ethernet/sfc/falcon/efx.c                |  2 +-
>  drivers/net/hyperv/rndis_filter.c                    |  2 +-
>  drivers/net/usb/aqc111.c                             |  2 +-
>  drivers/net/usb/ax88179_178a.c                       |  2 +-
>  drivers/net/usb/lan78xx.c                            |  2 +-
>  drivers/net/usb/r8152.c                              |  2 +-
>  drivers/s390/net/qeth_l2_main.c                      |  2 +-
>  drivers/s390/net/qeth_l3_main.c                      |  2 +-
>  net/bridge/br_if.c                                   | 12 ++++++------
>  net/core/dev.c                                       |  4 ++--
>  28 files changed, 49 insertions(+), 46 deletions(-)

...

> diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
> index 5528d12d1f48..c60ead337d06 100644
> --- a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
> +++ b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
> @@ -2320,7 +2320,7 @@ static void nfp_net_netdev_init(struct nfp_net *nn)
>  	netdev->min_mtu = ETH_MIN_MTU;
>  	netdev->max_mtu = nn->max_mtu;
>  
> -	netif_set_gso_max_segs(netdev, NFP_NET_LSO_MAX_SEGS);
> +	netif_set_tso_max_segs(netdev, NFP_NET_LSO_MAX_SEGS);
>  
>  	netif_carrier_off(netdev);
>  
> diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_repr.c b/drivers/net/ethernet/netronome/nfp/nfp_net_repr.c
> index 790e1d5e4b4a..75b5018f2e1b 100644
> --- a/drivers/net/ethernet/netronome/nfp/nfp_net_repr.c
> +++ b/drivers/net/ethernet/netronome/nfp/nfp_net_repr.c
> @@ -380,7 +380,7 @@ int nfp_repr_init(struct nfp_app *app, struct net_device *netdev,
>  
>  	/* Advertise but disable TSO by default. */
>  	netdev->features &= ~(NETIF_F_TSO | NETIF_F_TSO6);
> -	netif_set_gso_max_segs(netdev, NFP_NET_LSO_MAX_SEGS);
> +	netif_set_tso_max_segs(netdev, NFP_NET_LSO_MAX_SEGS);
>  
>  	netdev->priv_flags |= IFF_NO_QUEUE | IFF_DISABLE_NETPOLL;
>  	netdev->features |= NETIF_F_LLTX;