From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id C84721B169 for ; Wed, 10 Jan 2018 01:38:02 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jan 2018 16:38:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,337,1511856000"; d="scan'208";a="193699009" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga006.fm.intel.com with ESMTP; 09 Jan 2018 16:38:01 -0800 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 9 Jan 2018 16:38:01 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 9 Jan 2018 16:38:01 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.189]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.213]) with mapi id 14.03.0319.002; Wed, 10 Jan 2018 08:37:59 +0800 From: "Lu, Wenzhuo" To: "Ananyev, Konstantin" , 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//+SlgCAAIyMsP//qdEAgACeljD//4ZfgAAqn40A Date: Wed, 10 Jan 2018 00:37:58 +0000 Message-ID: <6A0DE07E22DDAD4C9103DF62FEBC09093B70CF98@shsmsx102.ccr.corp.intel.com> References: <6A0DE07E22DDAD4C9103DF62FEBC09093B70C42F@shsmsx102.ccr.corp.intel.com> <6A0DE07E22DDAD4C9103DF62FEBC09093B70C530@shsmsx102.ccr.corp.intel.com> <6A0DE07E22DDAD4C9103DF62FEBC09093B70C9CA@shsmsx102.ccr.corp.intel.com> <2601191342CEEE43887BDE71AB97725880E3A6B8@irsmsx105.ger.corp.intel.com> In-Reply-To: <2601191342CEEE43887BDE71AB97725880E3A6B8@irsmsx105.ger.corp.intel.com> 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: Wed, 10 Jan 2018 00:38:03 -0000 Hi Konstantin, > -----Original Message----- > From: Ananyev, Konstantin > Sent: Tuesday, January 9, 2018 8:15 PM > To: Lu, Wenzhuo ; Shahaf Shuler > ; Wu, Jingjing ; Yigit, > Ferruh > Cc: dev@dpdk.org > Subject: RE: [dpdk-dev] [PATCH v3 04/10] app/testpmd: convert to new > Ethdev Tx offloads API >=20 >=20 >=20 > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Lu, Wenzhuo > > Sent: Tuesday, January 9, 2018 11:37 AM > > To: Shahaf Shuler ; Wu, Jingjing > > ; Yigit, Ferruh > > Cc: dev@dpdk.org > > Subject: Re: [dpdk-dev] [PATCH v3 04/10] app/testpmd: convert to new > > Ethdev Tx offloads API > > > > Hi Shahaf, > > > > > -----Original Message----- > > > From: Shahaf Shuler [mailto:shahafs@mellanox.com] > > > Sent: Tuesday, January 9, 2018 6:02 PM > > > To: Lu, Wenzhuo ; Wu, Jingjing > > > ; Yigit, Ferruh > > > Cc: dev@dpdk.org > > > Subject: RE: [dpdk-dev] [PATCH v3 04/10] app/testpmd: convert to new > > > Ethdev Tx offloads API > > > > > > Tuesday, January 9, 2018 9:14 AM, Lu, Wenzhuo: > > > > > The original code doesn't have such restriction because testpmd > > > > > wasn't configuring Tx offloads at all. It used it's own Tx > > > > > offloads enum (which I removed on later patches) to indicate whic= h > offloads is set. > > > > > From the device perspective all the Tx offloads should be set. > > > > > It did had a way to configure offloads with txqflags parameter, > > > > > but this required queues reconfigurations. > > > > ' cmd_tx_vlan_set_parsed' is the function which configures TX vlan > > > insertion. > > > > This patch adds the restriction in it. > > > > For example, on ixgbe it does support on the fly configuration. > > > > APP doesn't need to stop the device or reconfigure the queues. > > > > > > What is mean is that in the old offloads API, all the Tx offloads > > > were enabled by default, besides the ones which were masked with > txqflags. > > > This is why testpmd didn't have any limitation on changing the Tx > offloads. > > > All of them were enabled, it just needed to choose with which one to = use. > > > > > > Now, with the new offloads API, the Tx offloads are disabled by > > > default, and enabled per application need on device and queue > configuration. > > > In order to call device/queue configuration the port must be > > > stopped. This is requirement from ethdev API. > > > > > > Now, there is an API in ethdev to configure Rx VLAN offloads on the > > > flight for supported devices. > > > If there are devices which supports it also in the Tx side, and you > > > see a good use case for that, then need to think of new API in > > > ethdev to configure Tx VLAN offloads on the flight. > > > > > > However, the plain conversion of testpmd from the old to the new API > > > requires the port to be stopped for all of the Tx offloads. > > Let's just talk about TX vlan insertion. Actually there's no ethdev > > API for it. And no configuration for it. Because vlan insertion is simp= le, it > only need to add a vlan tag when transmitting packets. >=20 > You still need an appropriate TX function be selected, otherwise mbuf- > >vlan_tci will be just ignored. > So you still has to specify at queue_setup flag that you would like to ha= ve > VLAN insertion offload enabled. > Konstantin O, it's a good point. I didn't consider the TX path selection.=20 Acked-by: Wenzhuo Lu >=20 > > You can see it's per packet thing. APP can set the ol_flags and > > vlan_tci in the mbuf of every packet to enable this function for the pa= cket > or not. I think it does be a on the fly function on any NIC.