From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id D762A325F for ; Tue, 9 Jan 2018 06:27:45 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Jan 2018 21:27:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,334,1511856000"; d="scan'208";a="191712629" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga005.jf.intel.com with ESMTP; 08 Jan 2018 21:27:44 -0800 Received: from fmsmsx120.amr.corp.intel.com (10.18.124.208) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 8 Jan 2018 21:27:44 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx120.amr.corp.intel.com (10.18.124.208) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 8 Jan 2018 21:27:43 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.189]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.159]) with mapi id 14.03.0319.002; Tue, 9 Jan 2018 13:27:42 +0800 From: "Lu, Wenzhuo" To: Shahaf Shuler , "Wu, Jingjing" , "Yigit, Ferruh" CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v3 04/10] app/testpmd: convert to new Ethdev Tx offloads API Thread-Index: AQHTfi5U+ewllJ8umUG0NKuYsrNbl6NrFnag Date: Tue, 9 Jan 2018 05:27:41 +0000 Message-ID: <6A0DE07E22DDAD4C9103DF62FEBC09093B70C42F@shsmsx102.ccr.corp.intel.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3 04/10] app/testpmd: convert to new Ethdev Tx offloads API X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jan 2018 05:27:46 -0000 Hi Shahaf, > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Shahaf Shuler > Sent: Tuesday, December 26, 2017 5:44 PM > To: Wu, Jingjing ; Yigit, Ferruh > > Cc: dev@dpdk.org > Subject: [dpdk-dev] [PATCH v3 04/10] app/testpmd: convert to new Ethdev > Tx offloads API >=20 > Ethdev Tx offloads API has changed since: >=20 > commit cba7f53b717d ("ethdev: introduce Tx queue offloads API") >=20 > Convert the application to use the new API. >=20 > This patch mandates the port to be stopped when configure the Tx offloads= . > This is because the PMD must be aware to the offloads changes on the > device and queue configuration. >=20 > Signed-off-by: Shahaf Shuler > --- > app/test-pmd/cmdline.c | 90 > ++++++++++++++++++++++++++++++++++++++++++--- > app/test-pmd/config.c | 55 ++++++++++++++++++--------- app/test- > pmd/testpmd.c | 3 ++ > 3 files changed, 124 insertions(+), 24 deletions(-) >=20 > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index > d8c73a9b1..58125839a 100644 > --- a/app/test-pmd/cmdline.c > +++ b/app/test-pmd/cmdline.c > @@ -3439,7 +3439,14 @@ cmd_tx_vlan_set_parsed(void *parsed_result, { > struct cmd_tx_vlan_set_result *res =3D parsed_result; >=20 > + if (!port_is_stopped(res->port_id)) { > + printf("Please stop port %d first\n", res->port_id); > + return; > + } > + > tx_vlan_set(res->port_id, res->vlan_id); > + > + cmd_reconfig_device_queue(res->port_id, 1, 1); > } >=20 I do have some concern about this behavior change, 'port_is_stopped' and ' = cmd_reconfig_device_queue '. 1, seems this behavior change is not necessary for using the new offload AP= I. Maybe splitting this patch to 2 is better. 2, some NICs doesn't need to be stopped or re-configured to make vlan funct= ions enabled. That's why the original code doesn't have this restriction. M= aybe figuring out a way to do the restriction in the driver layer is better= .