[dpdk-dev] [PATCH v2 05/15] security: switch metadata to dynamic mbuf field
Wang, Haiyue
haiyue.wang at intel.com
Tue Oct 27 03:01:27 CET 2020
> -----Original Message-----
> From: Thomas Monjalon <thomas at monjalon.net>
> Sent: Tuesday, October 27, 2020 06:20
> To: dev at dpdk.org
> Cc: Yigit, Ferruh <ferruh.yigit at intel.com>; david.marchand at redhat.com; Richardson, Bruce
> <bruce.richardson at intel.com>; olivier.matz at 6wind.com; andrew.rybchenko at oktetlabs.ru;
> akhil.goyal at nxp.com; Doherty, Declan <declan.doherty at intel.com>; Ankur Dwivedi <adwivedi at marvell.com>;
> Anoob Joseph <anoobj at marvell.com>; Guo, Jia <jia.guo at intel.com>; Wang, Haiyue <haiyue.wang at intel.com>;
> Jerin Jacob <jerinj at marvell.com>; Nithin Dabilpuram <ndabilpuram at marvell.com>; Kiran Kumar K
> <kirankumark at marvell.com>; Nicolau, Radu <radu.nicolau at intel.com>; Ray Kinsella <mdr at ashroe.eu>; Neil
> Horman <nhorman at tuxdriver.com>
> Subject: [PATCH v2 05/15] security: switch metadata to dynamic mbuf field
>
> The device-specific metadata was stored in the deprecated field udata64.
> It is moved to a dynamic mbuf field in order to allow removal of udata64.
>
> Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
> ---
> doc/guides/prog_guide/rte_security.rst | 9 +++---
> drivers/crypto/octeontx2/otx2_cryptodev_sec.c | 5 ++-
> drivers/net/ixgbe/ixgbe_ipsec.c | 5 ++-
> drivers/net/ixgbe/ixgbe_rxtx.c | 6 ++--
> drivers/net/octeontx2/otx2_ethdev.h | 1 +
> drivers/net/octeontx2/otx2_ethdev_sec.c | 5 ++-
> drivers/net/octeontx2/otx2_ethdev_sec_tx.h | 2 +-
> drivers/net/octeontx2/otx2_rx.h | 2 +-
> examples/ipsec-secgw/ipsec-secgw.c | 9 +++---
> examples/ipsec-secgw/ipsec_worker.c | 12 ++++---
> lib/librte_security/rte_security.c | 22 +++++++++++++
> lib/librte_security/rte_security.h | 32 +++++++++++++++++++
> lib/librte_security/rte_security_driver.h | 3 ++
> lib/librte_security/version.map | 3 ++
> 14 files changed, 96 insertions(+), 20 deletions(-)
>
For ixgbe PMD,
Acked-by: Haiyue Wang <haiyue.wang at intel.com>
But I feel that 'rte_security_dynfield' name is too generic, can it be
more specific about what the field is used for ?
Like below ;-)
#define RTE_SECURITY_DEV_METADATA(m) \
RTE_MBUF_DYNFIELD((m), \
rte_security_dev_metadata_offset, \
RTE_SECURITY_DEV_METADATA_TYPE *)
> +/**
> + * Get pointer to mbuf field for device-specific metadata.
> + *
> + * For performance reason, no check is done,
> + * the dynamic field may not be registered.
> + * @see rte_security_dynfield_is_registered
> + *
> + * @param mbuf packet to access
> + * @return pointer to mbuf field
> + */
> +static inline RTE_SECURITY_DYNFIELD_TYPE *
> +rte_security_dynfield(struct rte_mbuf *mbuf)
> +{
> + return RTE_MBUF_DYNFIELD(mbuf,
> + rte_security_dynfield_offset,
> + RTE_SECURITY_DYNFIELD_TYPE *);
> +}
> --
> 2.28.0
More information about the dev
mailing list