From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerin Jacob Subject: Re: [PATCH v2 05/39] examples/l3fwd: move to ethdev offloads API Date: Wed, 13 Dec 2017 23:02:04 +0530 Message-ID: <20171213173203.GA3462@jerin> References: <20171123121419.144132-1-shahafs@mellanox.com> <2601191342CEEE43887BDE71AB9772585FAC8AEB@irsmsx105.ger.corp.intel.com> <20171213075518.GA18228@jerin> <2601191342CEEE43887BDE71AB9772585FAC9140@irsmsx105.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Shahaf Shuler , "dev@dpdk.org" , "Nicolau, Radu" , "arybchenko@solarflare.com" To: "Ananyev, Konstantin" Return-path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0071.outbound.protection.outlook.com [104.47.33.71]) by dpdk.org (Postfix) with ESMTP id 77C029FE for ; Wed, 13 Dec 2017 18:32:25 +0100 (CET) Content-Disposition: inline In-Reply-To: <2601191342CEEE43887BDE71AB9772585FAC9140@irsmsx105.ger.corp.intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" -----Original Message----- > Date: Wed, 13 Dec 2017 12:10:26 +0000 > From: "Ananyev, Konstantin" > To: Jerin Jacob , Shahaf Shuler > > CC: "dev@dpdk.org" , "Nicolau, Radu" > , "arybchenko@solarflare.com" > > Subject: RE: [dpdk-dev] [PATCH v2 05/39] examples/l3fwd: move to ethdev > offloads API > > Hi Jerin, Hi Konstantin, > > > -----Original Message----- > > From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com] > > Sent: Wednesday, December 13, 2017 7:55 AM > > To: Shahaf Shuler > > Cc: Ananyev, Konstantin ; dev@dpdk.org; Nicolau, Radu ; > > arybchenko@solarflare.com > > Subject: Re: [dpdk-dev] [PATCH v2 05/39] examples/l3fwd: move to ethdev offloads API > > > > -----Original Message----- > > > Date: Wed, 13 Dec 2017 07:21:01 +0000 > > > From: Shahaf Shuler > > > To: "Ananyev, Konstantin" , "dev@dpdk.org" > > > , "Nicolau, Radu" , > > > "arybchenko@solarflare.com" > > > Subject: Re: [dpdk-dev] [PATCH v2 05/39] examples/l3fwd: move to ethdev > > > offloads API > > > > > > Tuesday, December 12, 2017 7:12 PM, Ananyev, Konstantin: > > > > > -----Original Message----- > > > > > From: Shahaf Shuler [mailto:shahafs@mellanox.com] > > > > > Sent: Tuesday, December 12, 2017 12:26 PM > > > > > To: dev@dpdk.org; Ananyev, Konstantin > > > > ; > > > > > Nicolau, Radu ; arybchenko@solarflare.com > > > > > Subject: [PATCH v2 05/39] examples/l3fwd: move to ethdev offloads API > > > > > > > > > > Ethdev offloads API has changed since: > > > > > > > > > > commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API") commit > > > > > cba7f53b717d ("ethdev: introduce Tx queue offloads API") > > > > > > > > > > This commit support the new API. > > > > > > > > > > Signed-off-by: Shahaf Shuler > > > > > --- > > > > > examples/l3fwd/main.c | 40 ++++++++++++++++++++++++++++++-------- > > > > -- > > > > > 1 file changed, 30 insertions(+), 10 deletions(-) > > > > > > > > > > diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c index > > > > > 6229568..3bdf4d5 100644 > > > > > --- a/examples/l3fwd/main.c > > > > > +++ b/examples/l3fwd/main.c > > > > > @@ -149,11 +149,9 @@ struct lcore_params { > > > > > .mq_mode = ETH_MQ_RX_RSS, > > > > > .max_rx_pkt_len = ETHER_MAX_LEN, > > > > > .split_hdr_size = 0, > > > > > - .header_split = 0, /**< Header Split disabled */ > > > > > - .hw_ip_checksum = 1, /**< IP checksum offload enabled */ > > > > > - .hw_vlan_filter = 0, /**< VLAN filtering disabled */ > > > > > - .jumbo_frame = 0, /**< Jumbo Frame Support disabled */ > > > > > - .hw_strip_crc = 1, /**< CRC stripped by hardware */ > > > > > + .ignore_offload_bitfield = 1, > > > > > + .offloads = (DEV_RX_OFFLOAD_CRC_STRIP | > > > > > + DEV_RX_OFFLOAD_CHECKSUM), > > > > > }, > > > > > .rx_adv_conf = { > > > > > .rss_conf = { > > > > > @@ -163,6 +161,7 @@ struct lcore_params { > > > > > }, > > > > > .txmode = { > > > > > .mq_mode = ETH_MQ_TX_NONE, > > > > > + .offloads = DEV_TX_OFFLOAD_MBUF_FAST_FREE, > > > > > > > > Hmm, does it mean a new warning for all PMDs (majority) which don't > > > > support DEV_TX_OFFLOAD_MBUF_FAST_FREE? > > > > > > Good point. > > > Unlike other offloads which are must for the application proper run, this one it only for optimizing the performance and should be set only > > if PMD supports. > > > Am continuing to aggregate reasons why the DEV_TX_OFFLOAD_MBUF_FAST_FREE should not be defined as an offload. Anyway we > > passed that... > > > > > > I will fix on v3. > > > > Removing is not an option as the PMDs rely on that flag to will have the > > impact. > > # I see DEV_TX_OFFLOAD_MBUF_FAST_FREE as hint driver to depict the application requirements > > # All the drivers by default can support DEV_TX_OFFLOAD_MBUF_FAST_FREE(They are using the hint or > > not is a different question) > > > > So, How about setting DEV_TX_OFFLOAD_MBUF_FAST_FREE in all PMD driver as > > dummy one? I think, currently, it can be moved to old API to new API > > transition function till the drivers change to new offload flag scheme. > > I don't think anyone plans to remove it right now. > If you believe your PMD does need it, that's ok by me. OK. > Though I still think it is a very limited usage for it, and I don't think > we have to make that flag supported by all PMDs. OK. I just suggested because adding the flag in PMD is harmless and we can avoid an extra check(setting the DEV_TX_OFFLOAD_MBUF_FAST_FREE only when PMD supports it) in application to hide warning as you pointed out. No strong opinion on the specifics, I am just cared only reaching the flag to driver. > Konstantin > > > > > We are planning to change nicvf driver to new offload scheme for this > > release so with this change, we have the performance impact on l3fwd > > application. > > > > I think, the other option could be to change usage/meaning of > > DEV_TX_OFFLOAD_MBUF_FAST_FREE flag where when the application needs > > multi-pool and reference count scheme then "it sets" the offload flags. > > If so, we don't need to set by default on the these applications.