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 D58ECA034F; Mon, 11 Oct 2021 11:15:05 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C4BD2410E6; Mon, 11 Oct 2021 11:15:05 +0200 (CEST) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id 15A98410E5 for ; Mon, 11 Oct 2021 11:15:04 +0200 (CEST) Received: from dggeme756-chm.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4HSY1761qNzbmln; Mon, 11 Oct 2021 17:10:35 +0800 (CST) Received: from [10.67.103.128] (10.67.103.128) by dggeme756-chm.china.huawei.com (10.3.19.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.8; Mon, 11 Oct 2021 17:15:02 +0800 To: "Li, Xiaoyun" , "dev@dpdk.org" CC: "Yigit, Ferruh" , "thomas@monjalon.net" References: <20211009084141.58054-1-humin29@huawei.com> From: "Min Hu (Connor)" Message-ID: <7fbee3b4-0483-5b6d-d904-0b2983b77527@huawei.com> Date: Mon, 11 Oct 2021 17:15:01 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.103.128] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggeme756-chm.china.huawei.com (10.3.19.102) X-CFilter-Loop: Reflected Subject: Re: [dpdk-dev] [PATCH] app/testpmd: retain all original dev conf when config DCB 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 Sender: "dev" ÔÚ 2021/10/11 14:49, Li, Xiaoyun дµÀ: > Hi > >> -----Original Message----- >> From: Min Hu (Connor) >> Sent: Saturday, October 9, 2021 16:42 >> To: dev@dpdk.org >> Cc: Yigit, Ferruh ; thomas@monjalon.net; Li, Xiaoyun >> >> Subject: [PATCH] app/testpmd: retain all original dev conf when config DCB >> >> From: Huisong Li >> >> When configuring DCB, testpmd retains the rx_mode/tx_mode configuration in >> rte_port->dev_conf. But some configurations, such as the link_speed, were not >> saved if it were set before configuring DCB. > > "if they were" or "if it was" > >> >> Fixes: 1a572499beb6 ("app/testpmd: setup DCB forwarding based on traffic >> class") >> Cc: stable@dpdk.org >> >> Signed-off-by: Huisong Li >> Signed-off-by: Min Hu (Connor) >> --- >> app/test-pmd/testpmd.c | 6 ++---- >> 1 file changed, 2 insertions(+), 4 deletions(-) >> >> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index >> eec4f1b81d..12a0db8796 100644 >> --- a/app/test-pmd/testpmd.c >> +++ b/app/test-pmd/testpmd.c >> @@ -3729,10 +3729,8 @@ init_port_dcb_config(portid_t pid, >> } >> rte_port = &ports[pid]; >> >> - memset(&port_conf, 0, sizeof(struct rte_eth_conf)); >> - >> - port_conf.rxmode = rte_port->dev_conf.rxmode; >> - port_conf.txmode = rte_port->dev_conf.txmode; >> + /* retain the original device configuration. */ >> + memcpy(&port_conf, &rte_port->dev_conf, sizeof(struct rte_eth_conf)); >> >> /*set configuration of DCB in vt mode and DCB in non-vt mode*/ >> retval = get_eth_dcb_conf(pid, &port_conf, dcb_mode, num_tcs, >> pfc_en); >> -- >> 2.33.0 > > Except the small issue in commit log, > Acked-by: Xiaoyun Li Thanks Xiaoyun, V2 has been sent. > . >