net/vhost: fix TSO feature default disablement
Checks
Commit Message
By default, TSO feature should be disabled because it requires
application's support to be functionnal as mentionned 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>
---
drivers/net/vhost/rte_eth_vhost.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Comments
On Fri, Apr 22, 2022 at 11:35 AM Maxime Coquelin
<maxime.coquelin@redhat.com> wrote:
>
> By default, TSO feature should be disabled because it requires
> application's support to be functionnal as mentionned 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>
LGTM.
Reviewed-by: David Marchand <david.marchand@redhat.com>
On 4/22/22 11:35, Maxime Coquelin wrote:
> By default, TSO feature should be disabled because it requires
> application's support to be functionnal as mentionned 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>
> ---
> drivers/net/vhost/rte_eth_vhost.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
Applied to dpdk-next-virtio/main.
Thanks,
Maxime
@@ -1643,11 +1643,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) {