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