From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adrien Mazarguil Subject: Re: [PATCH v3 0/6] Add MACsec offload support for ixgbe Date: Mon, 26 Dec 2016 16:15:37 +0100 Message-ID: <20161226151537.GD22106@6wind.com> References: <1481852611-103254-1-git-send-email-tiwei.bie@intel.com> <1482677880-117158-1-git-send-email-tiwei.bie@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 To: Tiwei Bie Return-path: Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52]) by dpdk.org (Postfix) with ESMTP id 5627E2B94 for ; Mon, 26 Dec 2016 16:15:46 +0100 (CET) Received: by mail-wm0-f52.google.com with SMTP id t79so266985769wmt.0 for ; Mon, 26 Dec 2016 07:15:46 -0800 (PST) Content-Disposition: inline In-Reply-To: <1482677880-117158-1-git-send-email-tiwei.bie@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" 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. I'm not commenting on any specific patch from this series, however I'm noticing this new trend of working around ethdev to add PMD-specific APIs. I would like to make sure it's not getting out of hand. To use the "rte_pmd_ixgbe_macsec_*()" API, applications must be linked with librte_pmd_ixgbe directly and have the related code under #ifdef RTE_LIBRTE_IXGBE_PMD like testpmd. Here we can see this ixgbe-specific API affects rte_mbuf.h and rte_ethdev.h (new PKT_TX_MACSEC, RTE_ETH_EVENT_MACSEC, DEV_RX_OFFLOAD_MACSEC_STRIP and DEV_TX_OFFLOAD_MACSEC_INSERT flags). - Shouldn't these flags have "IXGBE" somewhere in their name and/or be defined under #ifdef RTE_LIBRTE_IXGBE_PMD? - Why can't the MACsec API be defined globally, for instance won't i40e implement it as well someday? - Why bothering with TX/RX offload capabilities if applications know the underlying PMD anyway? 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. > v2: > - Update the documents for testpmd; > - Update the release notes; > - Reuse the functions provided by base code; > > v3: > - Add the missing parts of MACsec mbuf flag and reorganize the patch set; > - Add an ethdev event type for MACsec; > - Advertise the MACsec offload capabilities based on the mac type; > - Minor fixes and improvements; > > Tiwei Bie (6): > mbuf: add flag for MACsec > ethdev: add event type for MACsec > ethdev: add MACsec offload capability flags > net/ixgbe: add MACsec offload support > app/testpmd: add MACsec offload commands > doc: add ixgbe specific APIs > > app/test-pmd/cmdline.c | 389 ++++++++++++++++++++++ > app/test-pmd/macfwd.c | 2 + > app/test-pmd/macswap.c | 2 + > app/test-pmd/testpmd.h | 2 + > app/test-pmd/txonly.c | 2 + > doc/guides/rel_notes/release_17_02.rst | 10 + > doc/guides/testpmd_app_ug/testpmd_funcs.rst | 32 ++ > drivers/net/ixgbe/ixgbe_ethdev.c | 481 +++++++++++++++++++++++++++- > drivers/net/ixgbe/ixgbe_ethdev.h | 45 +++ > drivers/net/ixgbe/ixgbe_rxtx.c | 3 + > drivers/net/ixgbe/rte_pmd_ixgbe.h | 100 ++++++ > drivers/net/ixgbe/rte_pmd_ixgbe_version.map | 11 + > lib/librte_ether/rte_ethdev.h | 3 + > lib/librte_mbuf/rte_mbuf.c | 2 + > lib/librte_mbuf/rte_mbuf.h | 6 + > 15 files changed, 1085 insertions(+), 5 deletions(-) > > -- > 2.7.4 > -- Adrien Mazarguil 6WIND