From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id E1B2B282 for ; Tue, 27 Dec 2016 18:47:53 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP; 27 Dec 2016 09:47:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,417,1477983600"; d="scan'208";a="207232858" Received: from dpdk19.sh.intel.com (HELO dpdk19) ([10.239.129.113]) by fmsmga004.fm.intel.com with ESMTP; 27 Dec 2016 09:47:45 -0800 Date: Wed, 28 Dec 2016 01:42:23 +0800 From: Tiwei Bie To: Adrien Mazarguil Cc: dev@dpdk.org, wenzhuo.lu@intel.com, wei.dai@intel.com, xiao.w.wang@intel.com, olivier.matz@6wind.com, thomas.monjalon@6wind.com, konstantin.ananyev@intel.com, helin.zhang@intel.com Message-ID: <20161227174222.GA163565@dpdk19> References: <1481852611-103254-1-git-send-email-tiwei.bie@intel.com> <1482677880-117158-1-git-send-email-tiwei.bie@intel.com> <20161226151537.GD22106@6wind.com> <20161227013330.GA145018@dpdk19> <20161227143746.GC3737@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20161227143746.GC3737@6wind.com> User-Agent: Mutt/1.5.24 (2015-08-30) Subject: Re: [dpdk-dev] [PATCH v3 0/6] Add MACsec offload support for ixgbe 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, 27 Dec 2016 17:47:54 -0000 Hi Adrien, On Tue, Dec 27, 2016 at 03:37:46PM +0100, Adrien Mazarguil wrote: > Hi Tiwei, > > On Tue, Dec 27, 2016 at 09:33:31AM +0800, Tiwei Bie wrote: > > Hi Adrien, > > > > On Mon, Dec 26, 2016 at 04:15:37PM +0100, Adrien Mazarguil wrote: > > > Hi Tiwei, > > > > > > On Sun, Dec 25, 2016 at 10:57:54PM +0800, Tiwei Bie wrote: > > > > This patch set adds the MACsec offload support for ixgbe. > > > > The testpmd is also updated to support MACsec cmds. [...] > > > - Why can't the MACsec API be defined globally, for instance won't i40e > > > implement it as well someday? > > > > I think currently we prefer to implement some PMD features based on the > > PMD-specific APIs at first to avoid the bloating of the ethdev APIs. And > > when it proves to be generic (which means many people really need it and > > care about it, and more drivers are really going to implement it), then > > we make it as the global ethdev API. > > Understandable, but then unless the global API remains exactly the same > including the "rte_ixgbe_macsec" prefix (which I think won't happen), > applications need to be rewritten, it's not convenient, and as a result may > prevent adoption due to the following cycle: > > - Applications wait for the API to evolve before using MACsec. > - DPDK waits for applications to use the ixgbe MACsec API to improve it. > Yeah, I also saw these problems. And I also don't think this is a perfect way. But it seems that many of us prefer this way, so I just choose to accept it. > In the end, flags tied to a single PMD remain allocated in the global > namespace while the API is kept in this temporary state forever. > > I think doing the extra work to make it global from the start is worth the > trouble. This step could perhaps be made easier if people agreed that > struct eth_dev_ops (and friends) must be opaque to applications. > [...] > > > > Assuming these patches are kept as-is, I suggest we define a reserved space > > > documented as such for PMD-specific flags wherever they are used. > > > > > > > It sounds good to me. But it may involve many pieces of the lib, such > > as the mbuf ol_flags, ethdev event type, ethdev offload capabilities, > > and so on. So maybe it can be done as another work. > > Right, that was just an idea from the top of my head, we could define > reserved values only when they become necessary for a PMD as in this case, > e.g. instead of defining PKT_TX_MACSEC, one would define PKT_TX_RESERVED_0 > which would be interpreted as MACSEC by ixgbe until this API is exposed > globally. > > Other PMDs could implement other unrelated PMD-specific APIs through > RESERVED_0 in the meantime, so we preserve the precious space we have > for global APIs (especially inside mbufs). > > Thoughts? > When a certain PMD implemented several different features based on the PMD-specific API, and many of them need to define some flags in mbuf or the like, it still needs to waste many bits (i.e. we'll need to reserve many bits by that time). But any way, I love your idea! It's much better than the current approach! I'll update my patch. Thank you very much! ;-) Best regards, Tiwei Bie