net/vhost: fix TSO feature default disablement

Message ID 20220422093543.386475-1-maxime.coquelin@redhat.com (mailing list archive)
State Accepted, archived
Delegated to: Maxime Coquelin
Headers
Series net/vhost: fix TSO feature default disablement |

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-intel-Functional success Functional Testing PASS
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-abi-testing success Testing PASS

Commit Message

Maxime Coquelin April 22, 2022, 9:35 a.m. UTC
  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

David Marchand May 2, 2022, 11:28 a.m. UTC | #1
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>
  
Maxime Coquelin May 5, 2022, 7:56 p.m. UTC | #2
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
  

Patch

diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index 070f0e6dfd..19c80044c8 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -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) {