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 B29F6A034F; Mon, 11 Oct 2021 08:50:01 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0345A410E5; Mon, 11 Oct 2021 08:49:59 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 7F6DB40E01 for ; Mon, 11 Oct 2021 08:49:55 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10133"; a="227097783" X-IronPort-AV: E=Sophos;i="5.85,364,1624345200"; d="scan'208";a="227097783" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Oct 2021 23:49:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,364,1624345200"; d="scan'208";a="625379542" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga001.fm.intel.com with ESMTP; 10 Oct 2021 23:49:54 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Sun, 10 Oct 2021 23:49:53 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Sun, 10 Oct 2021 23:49:53 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Sun, 10 Oct 2021 23:49:53 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.171) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Sun, 10 Oct 2021 23:49:53 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MG0v6U4tcOOEuOKudXXsqfPYxERhvKC2p+18NTuoP3tZZg8QN6azKOms0j1KCDxmJK9DlnuTzlg9aaijGfM3kmI4ONILrrk+s0oTErspFVQSTsy5OqhxyG1t0SHzWI9nRd4KtNGriEbj20h+gXXsja5qnLLBt+P6hN3Vi5sfIfoCjA/uI8/O97zeSSnoAoSKiexIFnBjmMXJ6CiLdEaMZcUCBuuumLaG5p6PSWVlDwkwyHzw8ucyODHSkqLhvgc6X316RWl2Y7qK7gxSy8YT5/hZhb+LTsfOIzdoozSIbdrU0tnwG8I0cqZZ5Z/58kIM48dxjrB2YRCM0J6lYLLr1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=tbaAFyMiR5Hy13VT+Fnv7JVzInoNNe/nyWqXXJTXLlg=; b=Uy5vRFLhzYbt2MjSCWtGFLz+IVLMMSnQPrZIq3HY0+gBn16X8RX5HlxYfc/ectyIa8yLYedRtkgCQDg91HQ2wiiC8jA0GW21huJuvD0fQagUu5MY7QAdymfE2V63/p4iP7kS6PjNPOiDJ3qsUfQ0fAQkaEDuuBr/bEbcLDhqCxcQtQbTJWmuxj5iXv0S5ykmUfinUzPpoItVMVtRCn6rx8/5PD9cC0KfQTfzakp15AzoaWgJdAHku6e+lo9uBzYrmE95Jxs/kewUAif4i+lpbNLcm1SdE4HspxwltGd8kUItt7tqJZuKok29jRzG1TiKcRe3c1SrN+MzzFwlxhcYag== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tbaAFyMiR5Hy13VT+Fnv7JVzInoNNe/nyWqXXJTXLlg=; b=zSZ1dTZ5USZpRFcMj82ASFmvCudY1GFwYNLN25YufKItUTdxG+2eDFP/wgpVtHrFy/CPdW9u8RKj0eTcYBMMTlpxHd47N8P9FRsraWpfbyGtE6ns26hcBthibzdWOr1JJL/Q+puDvAd4CimjFsSuOmDKP9Ny1P5kSMyRKaspsfw= Received: from DM4PR11MB5534.namprd11.prod.outlook.com (2603:10b6:5:391::22) by DM6PR11MB3018.namprd11.prod.outlook.com (2603:10b6:5:68::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18; Mon, 11 Oct 2021 06:49:50 +0000 Received: from DM4PR11MB5534.namprd11.prod.outlook.com ([fe80::3d9b:76d7:e274:bad3]) by DM4PR11MB5534.namprd11.prod.outlook.com ([fe80::3d9b:76d7:e274:bad3%3]) with mapi id 15.20.4587.026; Mon, 11 Oct 2021 06:49:50 +0000 From: "Li, Xiaoyun" To: "Min Hu (Connor)" , "dev@dpdk.org" CC: "Yigit, Ferruh" , "thomas@monjalon.net" Thread-Topic: [PATCH] app/testpmd: retain all original dev conf when config DCB Thread-Index: AQHXvOnIDrnXyFcWfEO36j0YJU9ao6vNXdYg Date: Mon, 11 Oct 2021 06:49:49 +0000 Message-ID: References: <20211009084141.58054-1-humin29@huawei.com> In-Reply-To: <20211009084141.58054-1-humin29@huawei.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: huawei.com; dkim=none (message not signed) header.d=none;huawei.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 0fc4d13d-b017-4c7f-cfd5-08d98c835265 x-ms-traffictypediagnostic: DM6PR11MB3018: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:747; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: hx9bYTz4YvhI4cIqRKGjZSJsD1sXsGK99MbTNC7e1Jz3TC1qykZ9ttCl6eyA7dGesK8R+UR6jDeFCl3MBP3bFVAplmS+lSlrl5xnKzHBRTKuTXJSENUXgEpA8e47pbyfpN2TNQtcOnDCil8CM4kMVwHR3jMcUDXHWwR6zyGPCGjWLo9/zDCWXRDbWLpZDsCtFqnzfCrk7OYZisHKl0lPGIhp8T36oDL8kebhjFpk0c0l/V59r2NjcnLhTz4szTtvKhzPK6H6efr16t6ihFuHLiU0QtcHZlfB+BHIn9Sk40JgS7oVC4MJ1hqa30+8Ys4sTPBv3Fl/q2tB9VQ56AxJtSYrJGDHSxy5nmFD6CiSe10eDgrglAvDVsQprzGLdWXmqc+EJ8C9ytMkbE+YLADoIT+1iN8TAeb6Dqb6p3HDqk5sEEi3J9o352vCCrO10//s5xrpEfGDvBh38WmCh+tHPic4rvyyCeRScK+kSLFm65mpKJVgDTNq+87uRCbOINXAP08FwA2maxJBk1KBryL+4uyrcshGmUuGZ162l6fDjyJYJwZLH859P98CNAwKFSyn3zz+U+uVUv7crZMIpN43QWz6mwbMOWDmUePlyOKmVFGp1ZWsXWFa+5WVsPRaRqUR0vJ7GKD91ig6dQvJU5kvYteyx7UvAn12aUvO4J9PPVST+nkJ8734/Y+DxLt23BeTKALG/8Ayfosiu/wc7QYhPA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR11MB5534.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(86362001)(316002)(64756008)(66556008)(66446008)(83380400001)(66476007)(66946007)(110136005)(54906003)(55016002)(9686003)(76116006)(6506007)(53546011)(186003)(38100700002)(122000001)(8936002)(508600001)(38070700005)(8676002)(71200400001)(52536014)(26005)(4326008)(33656002)(5660300002)(2906002)(7696005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?tlHUKqdI+LESksAANcBREFYYO3OgESSWrBrikDnm5/orJ2XiMYvAvLI7q8eb?= =?us-ascii?Q?cCkY/hjCgBNuiCTirONyGO7fmEsrjELmjVOZ69809lHTeMVgJgEc2aGOAoE2?= =?us-ascii?Q?8wXfXf0bzAsHAKiimvBAP/mrmr7ttZVs0l8m65HhGBNycHkzadfwp8wiDskI?= =?us-ascii?Q?VnFZ/wdl47gXhrsPkhQzjhRmn3punYttFPiDKxGbMVfe++1u2Zm6pMjDUYHP?= =?us-ascii?Q?wtlIQDZdCQDub5avWU9pAAKqSGxjz2EYMNfK/CNzU0zc23Cljj4ECcVbhq88?= =?us-ascii?Q?HuZKFsDE4miNVwvyKlVhjaf1ifn/CGVDs2dtiyfGIAGlTFdDi9YnCzPFyuv3?= =?us-ascii?Q?QSDZx0Jfrbt4T9PliFNkp6JMGJsLOeDCIQPlfYp5lWL3GTafKIO8l/uxYucu?= =?us-ascii?Q?6Zd5tRzaBX9zKVYkhILo854W+34gdIdHrZXN91evvTSsH+6rDJ+0CEtpSX6y?= =?us-ascii?Q?UUj+e0fm0K2ecuef682pl4SLjs5FCoO9aj54pHHq39LzOel0cuTK2dvNJawh?= =?us-ascii?Q?2znSbpp/+TgJb5/KO6qzP+4i4Rr01p0YAEHTpmOKQ3YbL3HzuX3hm9es/5qv?= =?us-ascii?Q?YBadTuItDmFyaccqp8m3SEppE9gN4Ajwo+IoVuDZkDEBsYttBpQI9alEIeAQ?= =?us-ascii?Q?VG1/8ofeIkmeNeXIXFhET+6vpme+u+ahi9RGs7ncuuo/w7xDaIgkYrnLt3+w?= =?us-ascii?Q?ij4ohMW1m1PqYNsA0CRgb1frjcJcxbIp/ru1aXAiXFicx//ZbyHb3YqgGvh1?= =?us-ascii?Q?YJlR0Ml1be6P5wgH3cveFtmiLAHgbcV2yd7UqTdTWEct9BQUvmClca1iH31E?= =?us-ascii?Q?RpnFZIJ4FYSu4WU6shqsJZFVI99f5shljlujyBQvCCJqFbllUvKFJDZu/4L+?= =?us-ascii?Q?eFnM3yf6vqg8wtJI1LnUyNrAae3t2xZodit+mtLEDd0CDyjrYWh6401YAcMa?= =?us-ascii?Q?DH5Q0+Ec8+uqRnWX/f/Hlhk39RzJGawhjYuaUJsrGZScjYu9cKNGNaqUvix4?= =?us-ascii?Q?7ZLBGkFoqr9/uWy9DF34R6OjMteHoE8PyTgVmkscMut0eA5xiSVD2BOZAmlo?= =?us-ascii?Q?fhs02dMUheBkqiXHEfRCJXKD3yXQD3T9VOtmmdsFEkJT3IeKdE7Zd+KHRcxL?= =?us-ascii?Q?48U2f99j/LQ9EJiSgd/NMpy6ktszV4HvDQOV5FV1vbqfwQ7dFwGsWNS8uoUh?= =?us-ascii?Q?a85pVU0NCCgY8g6A5elupIlSWfi3MgZd2L8C02SL9IRBXe1FV6dULArV5Xdl?= =?us-ascii?Q?rgX6F1ka7eVdwOBVcoULnJQ2HQpyjWCHi1JrDxwVwGHUi7xwYAF4DYpxoTCp?= =?us-ascii?Q?E88=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB5534.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0fc4d13d-b017-4c7f-cfd5-08d98c835265 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Oct 2021 06:49:49.9788 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: WtW0cX4x7biYReX2WoeFwYuTBjJqYEtGmDzJAwSRWow25v7pixxuKAfDsilIaAf3miV1Zv0K3Ng9aTAFlqmIqA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB3018 X-OriginatorOrg: intel.com 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" 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, Xiao= yun > > Subject: [PATCH] app/testpmd: retain all original dev conf when config DC= B >=20 > From: Huisong Li >=20 > When configuring DCB, testpmd retains the rx_mode/tx_mode configuration i= n > 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" >=20 > Fixes: 1a572499beb6 ("app/testpmd: setup DCB forwarding based on traffic > class") > Cc: stable@dpdk.org >=20 > Signed-off-by: Huisong Li > Signed-off-by: Min Hu (Connor) > --- > app/test-pmd/testpmd.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) >=20 > 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 =3D &ports[pid]; >=20 > - memset(&port_conf, 0, sizeof(struct rte_eth_conf)); > - > - port_conf.rxmode =3D rte_port->dev_conf.rxmode; > - port_conf.txmode =3D rte_port->dev_conf.txmode; > + /* retain the original device configuration. */ > + memcpy(&port_conf, &rte_port->dev_conf, sizeof(struct rte_eth_conf)); >=20 > /*set configuration of DCB in vt mode and DCB in non-vt mode*/ > retval =3D 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