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 B0613A00C4 for ; Sun, 6 Nov 2022 11:33:00 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8B33440691; Sun, 6 Nov 2022 11:33:00 +0100 (CET) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 620A14003C; Sun, 6 Nov 2022 11:32:58 +0100 (CET) Received: from [192.168.38.17] (aros.oktetlabs.ru [192.168.38.17]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id BB06562; Sun, 6 Nov 2022 13:32:57 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru BB06562 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1667730777; bh=E6VQ3p3EfKFW801Yy4OekHDKtWL7AJNYmou20x4hCHw=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=ggUfOri0tmiTyMIozoBOKSKg/Hoh5PKUxDcacLcQvtOHOKcbpr2t2b4Fi0mjCx7vP db4WHNyhlaM02WT2lofkxByHLPTfb2tArpIG8oSduMf40CIcLeCNMO/ZX5+Ti9PGdn 2fAsIPTqu4xZAFLZplQ3tlNOC7kWmWnX2sy7HMOk= Message-ID: <67e8fd1a-4d7b-232e-6b0c-e6b40c88251e@oktetlabs.ru> Date: Sun, 6 Nov 2022 13:32:57 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: [PATCH v4 1/2] app/testpmd: fix vlan offload of rxq Content-Language: en-US To: "Ye, MingjinX" , "lihuisong (C)" , "dev@dpdk.org" Cc: "stable@dpdk.org" , "Zhou, YidingX" , "Singh, Aman Deep" , "Zhang, Yuying" References: <20221026171007.654038-1-mingjinx.ye@intel.com> <230a18f4-258b-1265-bf1d-a3455d730813@huawei.com> <7c88fd96-25cb-8a08-2305-9ab550776187@huawei.com> From: Andrew Rybchenko Organization: OKTET Labs In-Reply-To: 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 On 11/4/22 14:33, Ye, MingjinX wrote: > > >> -----Original Message----- >> From: lihuisong (C) >> Sent: 2022年11月4日 18:18 >> To: Ye, MingjinX ; dev@dpdk.org >> Cc: stable@dpdk.org; Zhou, YidingX ; Singh, Aman >> Deep ; Zhang, Yuying >> >> Subject: Re: [PATCH v4 1/2] app/testpmd: fix vlan offload of rxq >> >> >> 在 2022/11/4 16:21, Ye, MingjinX 写道: >>> >>>> -----Original Message----- >>>> From: lihuisong (C) >>>> Sent: 2022年11月3日 15:01 >>>> To: Ye, MingjinX ; dev@dpdk.org >>>> Cc: stable@dpdk.org; Zhou, YidingX ; Singh, >>>> Aman Deep ; Zhang, Yuying >>>> >>>> Subject: Re: [PATCH v4 1/2] app/testpmd: fix vlan offload of rxq >>>> >>>> >>>> 在 2022/11/3 9:28, Ye, MingjinX 写道: >>>>>> -----Original Message----- >>>>>> From: lihuisong (C) >>>>>> Sent: 2022年10月28日 10:09 >>>>>> To: Ye, MingjinX ; dev@dpdk.org >>>>>> Cc: stable@dpdk.org; Zhou, YidingX ; Singh, >>>>>> Aman Deep ; Zhang, Yuying >>>>>> >>>>>> Subject: Re: [PATCH v4 1/2] app/testpmd: fix vlan offload of rxq >>>>>> >>>>>> >>>>>> 在 2022/10/27 19:02, Ye, MingjinX 写道: >>>>>>> Hi lihuisong, >>>>>>> >>>>>>> This means that queue offloads need to update by recalling >>>>>>> dev_configure and setup target queues. >>>>>> Why not update queue offloads in PMD? >>>>>>> Can you tell me, where is the limitation? >>>>>> According to other Rx/Tx offload configurations, this may not be a >>>> limitation. >>>>>> But it seems to create a dependency on user usage. >>>>>> >>>>>> Port VLAN releated offloads are set by ethdev ops. There is no >>>>>> requirement in ehedev layer that this port needs to stopped when >>>>>> set >>>> these offloads. >>>>>> Now it depends on user does recall dev_configure and setup queues >>>>>> to update queue offloads because of setting these offloads. >>>>>>> Thanks, >>>>>>> Mingjin >>>>>>> >>>>>>>> -----Original Message----- >>>>>>>> From: lihuisong (C) >>>>>>>> Sent: 2022年10月26日 17:53 >>>>>>>> To: Ye, MingjinX ; dev@dpdk.org >>>>>>>> Cc: stable@dpdk.org; Zhou, YidingX ; >>>>>>>> Singh, Aman Deep ; Zhang, Yuying >>>>>>>> >>>>>>>> Subject: Re: [PATCH v4 1/2] app/testpmd: fix vlan offload of rxq >>>>>>>> >>>>>>>> >>>>>>>> 在 2022/10/27 1:10, Mingjin Ye 写道: >>>>>>>>> After setting vlan offload in testpmd, the result is not updated >>>>>>>>> to rxq. Therefore, the queue needs to be reconfigured after >>>>>>>>> executing the "vlan offload" related commands. >>>>>>>>> >>>>>>>>> Fixes: a47aa8b97afe ("app/testpmd: add vlan offload support") >>>>>>>>> Cc: stable@dpdk.org >>>>>>>>> >>>>>>>>> Signed-off-by: Mingjin Ye >>>>>>>>> --- >>>>>>>>> app/test-pmd/cmdline.c | 1 + >>>>>>>>> 1 file changed, 1 insertion(+) >>>>>>>>> >>>>>>>>> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c >>>>>>>>> index 17be2de402..ce125f549f 100644 >>>>>>>>> --- a/app/test-pmd/cmdline.c >>>>>>>>> +++ b/app/test-pmd/cmdline.c >>>>>>>>> @@ -4133,6 +4133,7 @@ cmd_vlan_offload_parsed(void >>>> *parsed_result, >>>>>>>>> else >>>>>>>>> vlan_extend_set(port_id, on); >>>>>>>>> >>>>>>>>> + cmd_reconfig_device_queue(port_id, 1, 1); >>>>>> In addition, I have some comments: >>>>>> 1) Normally, the parsed function of testpmd command needed to >>>>>> re-config port and queue needs to check if port status is STOPED. >>>>>> Why don't you add this check? >>>>> The check is exist. >>>> Where is the check? Currently, it seems that this check does not >>>> exist in the this command parsed function. >>> Check if the port is forwarded, in the source file test-pmd.c:2835. >> I don't understand why you mention the check in start_port(). It should be >> done in command parsed link other command. > > The command types include configuration and show these two types of commands. > show commands: There is no need to judge whether the port has stopped working. > configuration commands: Not all commands need to stop the port, there will be judgment if necessary. > > Hi, @andrew.rybchenko@oktetlabs.ru can you please help review this patch? Thanks. cmd_vlan_offload_parsed() goes down to the follow ethdev API functions: - rte_eth_dev_set_vlan_strip_on_queue() - rte_eth_dev_set_vlan_offload() There functions may change settings when port is started, running and processing traffic. And, as far as I know, it is the primary goal of these functions. So, we should not require application to do stop and reconfigure to apply these settings. It is an interesting question what should happen if application stops and starts the port back. As far as I can see it is not documented and it should be improved. I'd say that typical application would expect that dynamically done changes still apply. So, it should not be an application headache. The patch tries to care about it on application side and it is wrong from my point of view. Moreover, if we finally decide that application must care itself, the second argument should be 1 in stripq case only since other cases do not reconfigure Rx queue. However, it will not help anyway since rx_vlan_strip_set_on_queue() do not save configuration changes in testpmd structures. > >>>>>> If the check is not exist, queue offloads are not updated until the >>>>>> next port stop/start command is executed. Right? >>>>> yes >>>>>> 2) Why is the queue-based VLAN offload API not used? >>>>> VLAN offload is a port-related configuration. If a single port is >>>>> changed, the associated queue needs to be all updated in >>>>> configuration. Therefore, there will be no additional api to configure. >>>>>>    Like, rte_eth_dev_set_vlan_strip_on_queue. It seems that this >>>>>> kind of API is >>>>>>    dedicated to do this. >>>>>>>> This means that queue offloads need to upadte by re-calling >>>>>>>> dev_configure and setup all queues, right? >>>>>>>> If it is, this adds a usage limitation. >>>>>>>>> return; >>>>>>>>> } >>>>>>>>>