From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5A515A0032; Fri, 22 Apr 2022 11:35:53 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4FB6A4067B; Fri, 22 Apr 2022 11:35:53 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id E97AD40042 for ; Fri, 22 Apr 2022 11:35:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1650620151; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NzFF7At1LdDQAajSUJ/rY2Ap4rmCPPLExSx2sNKIsoQ=; b=W5jy+CJsG5fzRr1MstwVtLiE+nOck66zAPa5bPaAHbXuGiPmhrKyPi/my/jcnoujOstWuF 9H4lPXHCN4MvYSGD5/Ngvx9RWNtn/unF99Lc6TDqBRO8GYD8yf7F8z6LOASduu1adt+1zE 9/2lifrc7mrM8ApPE6qpGUlMfGSPHqo= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-424-IjV_G6odNBuiWUf4fq5crw-1; Fri, 22 Apr 2022 05:35:46 -0400 X-MC-Unique: IjV_G6odNBuiWUf4fq5crw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1F0B53C161A2; Fri, 22 Apr 2022 09:35:46 +0000 (UTC) Received: from max-t490s.redhat.com (unknown [10.39.208.35]) by smtp.corp.redhat.com (Postfix) with ESMTP id DBE1341136E2; Fri, 22 Apr 2022 09:35:44 +0000 (UTC) From: Maxime Coquelin To: dev@dpdk.org, chenbo.xia@intel.com, david.marchand@redhat.com Cc: Maxime Coquelin , stable@dpdk.org Subject: [PATCH] net/vhost: fix TSO feature default disablement Date: Fri, 22 Apr 2022 11:35:43 +0200 Message-Id: <20220422093543.386475-1-maxime.coquelin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 --- drivers/net/vhost/rte_eth_vhost.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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) { -- 2.35.1