]> git.droids-corp.org - dpdk.git/commitdiff
net/vhost: fix TSO feature default disablement
authorMaxime Coquelin <maxime.coquelin@redhat.com>
Fri, 22 Apr 2022 09:35:43 +0000 (11:35 +0200)
committerMaxime Coquelin <maxime.coquelin@redhat.com>
Mon, 9 May 2022 19:15:38 +0000 (21:15 +0200)
By default, TSO feature should be disabled because it requires
application's support to be functional as mentioned in the
documentation.

However, if "tso" devarg was not specified, the feature did
not get disabled.

This patch fixes this issue, so that TSO is disabled, even if
"tso=0" is not passed as devarg.

Fixes: e289400669d5 ("net/vhost: support TSO disabling")
Cc: stable@dpdk.org
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
drivers/net/vhost/rte_eth_vhost.c

index 8a6595504ab6638cc35d850fe81ea21c18a930f9..a248a65df41d00441f4ee040d12740d166cba531 100644 (file)
@@ -1654,11 +1654,11 @@ rte_pmd_vhost_probe(struct rte_vdev_device *dev)
                                &open_int, &tso);
                if (ret < 0)
                        goto out_free;
+       }
 
-               if (tso == 0) {
-                       disable_flags |= (1ULL << VIRTIO_NET_F_HOST_TSO4);
-                       disable_flags |= (1ULL << VIRTIO_NET_F_HOST_TSO6);
-               }
+       if (tso == 0) {
+               disable_flags |= (1ULL << VIRTIO_NET_F_HOST_TSO4);
+               disable_flags |= (1ULL << VIRTIO_NET_F_HOST_TSO6);
        }
 
        if (rte_kvargs_count(kvlist, ETH_VHOST_LINEAR_BUF) == 1) {