Skip to content

Commit

Permalink
net/vhost: fix TSO feature default disablement
Browse files Browse the repository at this point in the history
[ upstream commit 6d70462 ]

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: e289400 ("net/vhost: support TSO disabling")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
  • Loading branch information
mcoquelin authored and kevintraynor committed May 24, 2022
1 parent 4852da7 commit e3036fb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/net/vhost/rte_eth_vhost.c
Expand Up @@ -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) {
Expand Down

0 comments on commit e3036fb

Please sign in to comment.