From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 4085CA0A02;
	Sat, 27 Mar 2021 04:54:03 +0100 (CET)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id B8D1B40686;
	Sat, 27 Mar 2021 04:54:02 +0100 (CET)
Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190])
 by mails.dpdk.org (Postfix) with ESMTP id 11B104067B
 for <dev@dpdk.org>; Sat, 27 Mar 2021 04:54:00 +0100 (CET)
Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.59])
 by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4F6lJF1cBlznZy1;
 Sat, 27 Mar 2021 11:51:25 +0800 (CST)
Received: from [10.78.49.194] (10.78.49.194) by DGGEMS406-HUB.china.huawei.com
 (10.3.19.206) with Microsoft SMTP Server id 14.3.498.0;
 Sat, 27 Mar 2021 11:53:56 +0800
To: "Li, Xiaoyun" <xiaoyun.li@intel.com>, "linuxarm@openeuler.org"
 <linuxarm@openeuler.org>, dev <dev@dpdk.org>
References: <1614939741-63927-1-git-send-email-oulijun@huawei.com>
 <1614939741-63927-2-git-send-email-oulijun@huawei.com>
 <DM4PR11MB5534A8C78C7ADE41F41ECB4C99649@DM4PR11MB5534.namprd11.prod.outlook.com>
 <2a0bee90-2c74-5f07-aaf0-cba8b94944e8@huawei.com>
 <DM4PR11MB5534CE6F3E8961A77083E7BE99639@DM4PR11MB5534.namprd11.prod.outlook.com>
 <918ea8b0-8d5d-ea2b-efce-7995d787b873@huawei.com>
 <DM4PR11MB55345A99567EA390CA26170499629@DM4PR11MB5534.namprd11.prod.outlook.com>
From: oulijun <oulijun@huawei.com>
Message-ID: <01839804-cf22-56a9-40d8-2798a0dd1130@huawei.com>
Date: Sat, 27 Mar 2021 11:53:56 +0800
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101
 Thunderbird/52.1.0
MIME-Version: 1.0
In-Reply-To: <DM4PR11MB55345A99567EA390CA26170499629@DM4PR11MB5534.namprd11.prod.outlook.com>
Content-Type: text/plain; charset="utf-8"; format=flowed
Content-Transfer-Encoding: 8bit
X-Originating-IP: [10.78.49.194]
X-CFilter-Loop: Reflected
Subject: Re: [dpdk-dev] [Linuxarm] Re: [PATCH 1/3] app/testpmd: fix
 forwarding configuration when DCB test
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>



在 2021/3/25 10:21, Li, Xiaoyun 写道:
> 
> 
>> -----Original Message-----
>> From: oulijun <oulijun@huawei.com>
>> Sent: Wednesday, March 24, 2021 21:40
>> To: linuxarm@openeuler.org; Li, Xiaoyun <xiaoyun.li@intel.com>; dev
>> <dev@dpdk.org>
>> Subject: Re: [Linuxarm] Re: [PATCH 1/3] app/testpmd: fix forwarding
>> configuration when DCB test
>>
>>
>>
>> 在 2021/3/24 10:03, Li, Xiaoyun 写道:
>>>
>>>
>>>> -----Original Message-----
>>>> From: oulijun <oulijun@huawei.com>
>>>> Sent: Tuesday, March 23, 2021 22:19
>>>> To: Li, Xiaoyun <xiaoyun.li@intel.com>; Yigit, Ferruh
>>>> <ferruh.yigit@intel.com>
>>>> Cc: dev@dpdk.org; linuxarm@openeuler.org
>>>> Subject: Re: [PATCH 1/3] app/testpmd: fix forwarding configuration
>>>> when DCB test
>>>>
>>> <snip>
>>>>>> @@ -2707,14 +2707,16 @@ stop_port(portid_t pid)
>>>>>>     	portid_t peer_pl[RTE_MAX_ETHPORTS];
>>>>>>     	int peer_pi;
>>>>>>
>>>>>> -	if (dcb_test) {
>>>>>> -		dcb_test = 0;
>>>>>> -		dcb_config = 0;
>>>>>> -	}
>>>>>> -
>>>>>>     	if (port_id_is_invalid(pid, ENABLED_WARN))
>>>>>>     		return;
>>>>>>
>>>>>> +	/*
>>>>>> +	 * In "start_port" function, dcb_test is set to 1 based on dcb_config.
>>>>>> +	 * So it should be cleared when dcb_config is 0.
>>>>>> +	 */
>>>>>> +	if (dcb_config == 0)
>>>>>> +		dcb_test = 0;
>>>>>> +
>>>>>
>>>>> I don't understand why are you changing this.
>>>>> dcb_test will only be set when dcb_config is 1 when starting ports.
>>>>> And both
>>>> dcb_test and dcb_config will be cleared when stopping ports.
>>>>> So dcb will only affect when you set port dcb and then start port
>>>>> and when
>>>> stop port dcb will be cleared.
>>>>>
>>>> Yes, I think. The forwarding streams should not be changed from
>>>> "dcb_fwd_config_setup" to "rss_fwd_config_setup" after dcb info is
>> configured.
>>>> But, now, the logical codes do it when stopping ports and then starting ports.
>>>>> So what's the problem of original codes?
>>>>>
>>>>> Your change will cause issues that there's no place to set
>>>>> dcb_config as 0. If
>>>> you config dcb, then it'll be always dcb mode unless restart the whole
>> testpmd.
>>>>>
>>>> As far as I know, the current testpmd only supports switching from
>>>> the normal mode to the dcb mode, but does not support the reverse
>> operation.
>>>> And " dcb_config" is set to 1, and then "dcb_test" is set to 1 after
>>>> config.
>>>
>>> You're not answering my questions. Why are you changing the behavior of
>> testpmd?
>>> Your change will make testpmd stay dcb mode once set dcb mode and can't go
>> back to normal mode. If users want to go back to normal mode, he/she has to
>> restart the whole testpmd.
>>>
>> Yes. Testpmd and PMD driver are both in dcb mode after dcb info is configured.
>> In my opinion, the 'dcb_test' flag can't be clear to go back to normal mode after
>> stopping port and then starting port. Because PMD driver is still dcb mode. If
>> users want to go back it, users should disable dcb mode and enable RSS or other
>> mode.
>>
>>> It worked as you can set dcb mode and start port. After stopping port, if you
>> still want dcb mode, you need to set dcb mode command again. But at least the
>> old way won't break anything.
>>> @Yigit, Ferruh Not sure which behavior is better, what do you think?
>>>
>>> And @oulijun can you just answer all comments in one thread?
>>>
>> After stopping port, the 'dcb_test' flag is clear. At this moment, the dcb
>> configuration in testpmd has not be changed.  users may not understand why
>> the DCB mode needs to be reconfigured.
> 
> OK. You're right. There's no place writing port->dcb_flag back to 0.
> 
Yes. Unless testpmd supports switching from DCB mode to other modes.
Do you have any other suggestions about this patch set, xiaoyun?
>>>>>>     	printf("Stopping ports...\n");
>>>>>>
>>>>>>     	RTE_ETH_FOREACH_DEV(pi) {
>>>>>> --
>>>>>> 2.7.4
>>>>>
>>>>> .
>>>>>
>>> _______________________________________________
>>> Linuxarm mailing list -- linuxarm@openeuler.org To unsubscribe send an
>>> email to linuxarm-leave@openeuler.org
>>>