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 41557A0544 for ; Wed, 8 Jun 2022 10:19:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 309BC42802; Wed, 8 Jun 2022 10:19:57 +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 67CE9427F4 for ; Wed, 8 Jun 2022 10:19:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654676394; 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: in-reply-to:in-reply-to:references:references; bh=oKKK6oHcPupFvlqx8hhKcS7jlSSnrVj+rti6pdLZ1v0=; b=WZF6q46hZUW9yTC3yVzIaZuyBjnLaLKo5e7RTYCeg69AeY41EUlSTcBviRnlaN+nmjy/yE lXT7lz1Hwrgt4K52jvv2LmctyPNIjDO92nywcga4HgIwnAZaH4EYr5QeHwVdPZ4N2YVebV 4sm/w19nmBd6r7sg3wVKIS4rhRLjeCE= 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-112-qJkcLUXwNeO9CLWMxIjr3A-1; Wed, 08 Jun 2022 04:19:52 -0400 X-MC-Unique: qJkcLUXwNeO9CLWMxIjr3A-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id AA54B3801F52; Wed, 8 Jun 2022 08:19:51 +0000 (UTC) Received: from [10.39.208.20] (unknown [10.39.208.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3056D400F3FF; Wed, 8 Jun 2022 08:19:50 +0000 (UTC) Message-ID: <22fab040-5c5c-2b19-e010-87d7717a3a09@redhat.com> Date: Wed, 8 Jun 2022 10:19:48 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH 3/6] net/vhost: enable compliant offloading mode To: "Ma, WenwuX" , "Xia, Chenbo" , "dev@dpdk.org" , "jasowang@redhat.com" , "david.marchand@redhat.com" , "Matz, Olivier" Cc: "stable@dpdk.org" References: <20220505102729.821075-1-maxime.coquelin@redhat.com> <20220505102729.821075-4-maxime.coquelin@redhat.com> From: Maxime Coquelin In-Reply-To: X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 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-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi Wenwu, On 6/7/22 03:19, Ma, WenwuX wrote: > Hi Maxime, > >> -----Original Message----- >> From: Xia, Chenbo >> Sent: 2022年5月16日 21:40 >> To: Maxime Coquelin ; dev@dpdk.org; >> jasowang@redhat.com; david.marchand@redhat.com; >> olivier.matz@6wind.com >> Cc: stable@dpdk.org >> Subject: RE: [PATCH 3/6] net/vhost: enable compliant offloading mode >> >>> -----Original Message----- >>> From: Maxime Coquelin >>> Sent: Monday, May 16, 2022 9:29 PM >>> To: Xia, Chenbo ; dev@dpdk.org; >>> jasowang@redhat.com; david.marchand@redhat.com; >> olivier.matz@6wind.com >>> Cc: stable@dpdk.org >>> Subject: Re: [PATCH 3/6] net/vhost: enable compliant offloading mode >>> >>> Hi Chenbo, >>> >>> On 5/16/22 15:26, Xia, Chenbo wrote: >>>> Hi Maxime, >>>> >>>>> -----Original Message----- >>>>> From: Maxime Coquelin >>>>> Sent: Thursday, May 5, 2022 6:27 PM >>>>> To: dev@dpdk.org; jasowang@redhat.com; Xia, Chenbo >>> ; >>>>> david.marchand@redhat.com; olivier.matz@6wind.com >>>>> Cc: stable@dpdk.org; Maxime Coquelin >>>>> Subject: [PATCH 3/6] net/vhost: enable compliant offloading mode >>>>> >>>>> This patch enables the compliant offloading flags mode by default, >>>>> which prevents the Rx path to set Tx offload flags, which is >>>>> illegal. A new legacy-ol-flags devarg is introduced to enable the >>>>> legacy behaviour. >>>>> >>>>> Signed-off-by: Maxime Coquelin >>>>> --- >>>>> doc/guides/nics/vhost.rst | 6 ++++++ >>>>> drivers/net/vhost/rte_eth_vhost.c | 19 ++++++++++++++++--- >>>>> 2 files changed, 22 insertions(+), 3 deletions(-) >>>>> >>>>> diff --git a/doc/guides/nics/vhost.rst b/doc/guides/nics/vhost.rst >>>>> index ee802ec4a8..d7c0e2ade8 100644 >>>>> --- a/doc/guides/nics/vhost.rst >>>>> +++ b/doc/guides/nics/vhost.rst >>>>> @@ -64,6 +64,12 @@ The user can specify below arguments in `--vdev` >>> option. >>>>> It is used to enable external buffer support in vhost library. >>>>> (Default: 0 (disabled)) >>>>> >>>>> +#. ``legacy-ol-flags``: >>>>> + >>>>> + It is used to restore legacy behavior for offloading that was not >>>>> + compliant with offloading API. >>>>> + (Default: 0 (disabled)) >>>>> + >>>>> Vhost PMD event handling >>>>> ------------------------ >>>>> >>>>> diff --git a/drivers/net/vhost/rte_eth_vhost.c >>>>> b/drivers/net/vhost/rte_eth_vhost.c >>>>> index 070f0e6dfd..0a2e8d9b29 100644 >>>>> --- a/drivers/net/vhost/rte_eth_vhost.c >>>>> +++ b/drivers/net/vhost/rte_eth_vhost.c >>>>> @@ -31,9 +31,10 @@ enum {VIRTIO_RXQ, VIRTIO_TXQ, >> VIRTIO_QNUM}; >>>>> #define ETH_VHOST_CLIENT_ARG "client" >>>>> #define ETH_VHOST_IOMMU_SUPPORT "iommu-support" >>>>> #define ETH_VHOST_POSTCOPY_SUPPORT "postcopy-support" >>>>> -#define ETH_VHOST_VIRTIO_NET_F_HOST_TSO "tso" >>>>> -#define ETH_VHOST_LINEAR_BUF "linear-buffer" >>>>> -#define ETH_VHOST_EXT_BUF "ext-buffer" >>>>> +#define ETH_VHOST_VIRTIO_NET_F_HOST_TSO "tso" >>>>> +#define ETH_VHOST_LINEAR_BUF "linear-buffer" >>>>> +#define ETH_VHOST_EXT_BUF "ext-buffer" >>>>> +#define ETH_VHOST_LEGACY_OL_FLAGS "legacy-ol-flags" >>>>> #define VHOST_MAX_PKT_BURST 32 >>>>> > > ETH_VHOST_LEGACY_OL_FLAGS should be added into valid_arguments array. > > static const char *valid_arguments[] = { > ETH_VHOST_IFACE_ARG, > ETH_VHOST_QUEUES_ARG, > ETH_VHOST_CLIENT_ARG, > ETH_VHOST_IOMMU_SUPPORT, > ETH_VHOST_POSTCOPY_SUPPORT, > ETH_VHOST_VIRTIO_NET_F_HOST_TSO, > ETH_VHOST_LINEAR_BUF, > ETH_VHOST_EXT_BUF, > NULL > }; Thanks, good catch! I missed to test this new devarg addition, fixing it for v2. Maxime