nfp: enable TSO by default for nfp netdev
authorSimon Horman <simon.horman@corigine.com>
Tue, 5 Jul 2022 07:36:04 +0000 (08:36 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Jul 2022 07:15:39 +0000 (08:15 +0100)
We can benefit from TSO when the host CPU is not powerful enough,
so enable it by default now.

Signed-off-by: Yinjun Zhang <yinjun.zhang@corigine.com>
Reviewed-by: Louis Peens <louis.peens@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfp_net_common.c
drivers/net/ethernet/netronome/nfp/nfp_net_repr.c

index d4b4966..c5c3a4a 100644 (file)
@@ -2420,12 +2420,11 @@ static void nfp_net_netdev_init(struct nfp_net *nn)
        if (nfp_app_has_tc(nn->app) && nn->port)
                netdev->hw_features |= NETIF_F_HW_TC;
 
-       /* Advertise but disable TSO by default.
-        * C-Tag strip and S-Tag strip can't be supported simultaneously,
+       /* C-Tag strip and S-Tag strip can't be supported simultaneously,
         * so enable C-Tag strip and disable S-Tag strip by default.
         */
-       netdev->features &= ~(NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_HW_VLAN_STAG_RX);
-       nn->dp.ctrl &= ~(NFP_NET_CFG_CTRL_LSO_ANY | NFP_NET_CFG_CTRL_RXQINQ);
+       netdev->features &= ~NETIF_F_HW_VLAN_STAG_RX;
+       nn->dp.ctrl &= ~NFP_NET_CFG_CTRL_RXQINQ;
 
        /* Finalise the netdev setup */
        switch (nn->dp.ops->version) {
index 8ea4d8b..8b77582 100644 (file)
@@ -380,11 +380,10 @@ int nfp_repr_init(struct nfp_app *app, struct net_device *netdev,
 
        netdev->features = netdev->hw_features;
 
-       /* Advertise but disable TSO by default.
-        * C-Tag strip and S-Tag strip can't be supported simultaneously,
+       /* C-Tag strip and S-Tag strip can't be supported simultaneously,
         * so enable C-Tag strip and disable S-Tag strip by default.
         */
-       netdev->features &= ~(NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_HW_VLAN_STAG_RX);
+       netdev->features &= ~NETIF_F_HW_VLAN_STAG_RX;
        netif_set_tso_max_segs(netdev, NFP_NET_LSO_MAX_SEGS);
 
        netdev->priv_flags |= IFF_NO_QUEUE | IFF_DISABLE_NETPOLL;