From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 84DD11E2B for ; Mon, 9 Jan 2017 04:58:37 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP; 08 Jan 2017 19:58:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,339,1477983600"; d="scan'208";a="1109800301" Received: from debian.sh.intel.com (HELO debian) ([10.239.67.170]) by fmsmga002.fm.intel.com with ESMTP; 08 Jan 2017 19:58:34 -0800 Date: Mon, 9 Jan 2017 11:57:36 +0800 From: Tiwei Bie To: "Ananyev, Konstantin" Cc: Adrien Mazarguil , "dev@dpdk.org" , "Lu, Wenzhuo" , "Mcnamara, John" , "olivier.matz@6wind.com" , "thomas.monjalon@6wind.com" , "Zhang, Helin" , "Dai, Wei" , "Wang, Xiao W" Message-ID: <20170109035736.GA11691@debian> References: <2601191342CEEE43887BDE71AB9772583F0FEE0C@irsmsx105.ger.corp.intel.com> <20170104143923.GA57552@dpdk19> <2601191342CEEE43887BDE71AB9772583F0FEE6D@irsmsx105.ger.corp.intel.com> <20170104170011.GB56511@dpdk19> <2601191342CEEE43887BDE71AB9772583F100375@irsmsx105.ger.corp.intel.com> <20170104235608.GA133542@dpdk19> <20170105083322.GK12822@6wind.com> <2601191342CEEE43887BDE71AB9772583F1006B7@irsmsx105.ger.corp.intel.com> <20170105182141.GS12822@6wind.com> <2601191342CEEE43887BDE71AB9772583F10241C@irsmsx105.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <2601191342CEEE43887BDE71AB9772583F10241C@irsmsx105.ger.corp.intel.com> User-Agent: Mutt/1.7.2 (2016-11-26) Subject: Re: [dpdk-dev] [PATCH v5 3/8] ethdev: reserve capability flags for PMD-specific 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: Mon, 09 Jan 2017 03:58:38 -0000 On Sun, Jan 08, 2017 at 08:39:55PM +0800, Ananyev, Konstantin wrote: > Hi Adrien, > > > > > Hi Konstantin, > > > > On Thu, Jan 05, 2017 at 11:32:38AM +0000, Ananyev, Konstantin wrote: > > > Hi Adrien, > > > > > > > > > > > On Thu, Jan 05, 2017 at 07:56:08AM +0800, Tiwei Bie wrote: > > > > > On Thu, Jan 05, 2017 at 01:44:18AM +0800, Ananyev, Konstantin wrote: [...] > > Well my first reply to this thread was asking why isn't the whole API global > > from the start then? > > That's good question, and my preference would always be to have the > API to configure this feature as generic one. > I guess the main reason why it is not right now we don't reach an agreement > how this API should look like: > http://dpdk.org/ml/archives/dev/2016-September/047810.html > But I'll leave it to the author to provide the real reason here. > Yes, currently this work just provided a thin layer over 82599's hardware MACsec offload support to allow users configure 82599's MACsec offload engine. The current API may be too specific and may need a rework to be used with other NICs. > > > > Given there are valid reasons for it not to and no plan to make it so in the > > near future, applications must be aware that they are including > > rte_pmd_ixgbe.h to use it. That in itself is a limiting condition, right? > > Yes, it is definitely a limiting factor. > Though even if API to configure device to use macsec would be PMD specific right now, > The API to query that capability and the API to use it at datapath (mbuf.ol_flags) still > can be (and I think should be) device independent and transparent to use. > > > > > > Yes, right now it is supported only by ixgbe PMD, but why that should be the > > > reason to treat is as second-class citizen? > > > Let say PKT_TX_TUNNEL_* offloads also are supported only by one PMD right now. > > > > You are right about PKT_TX_TUNNEL_*, however these flags exist on their own > > and are not tied to any API function calls, unlike in this series where > > PKT_TX_MACSEC can only be used if the DEV_TX_OFFLOAD_MACSEC_INSERT > > capability is present > > I don't think PKT_TX_TUNNEL_* 'exists on its own'. > To use it well behaving app have to: > 1) Query that device does provide that capability: DEV_TX_OFFLOAD_*_TNL_TSO > 2) configure PMD( & device) to use that capability > 3) use that offload at run-time TX code (mb->ol_flags |= ...; mb->tx_offload = ...) > > For PKT_TX_TUNNEL_* 2) is pretty simple - user just need to make sure > that full-featured TX function will be selected: > txconf.txq_flags = 0; ...; rte_eth_tx_queue_setup(..., &txconf); > > For TX_MACSEC, as I understand 2) will be more complicated and > right now is PMD specific, but anyway the main pattern remains the same. > So at least 1) and 3) could be kept device neutral. > Yes, the PMD-specific APIs focus on the 2nd step: 2) configure PMD( & device) to use that capability The other parts (querying the capabilities, using the offload in the datapath, registering the callback, getting the statistics via xstats) are done in generic way. Best regards, Tiwei Bie