> -----Original Message-----
> From: Thomas Monjalon <tho...@monjalon.net>
> Sent: Tuesday, October 27, 2020 06:20
> To: dev@dpdk.org
> Cc: Yigit, Ferruh <ferruh.yi...@intel.com>; david.march...@redhat.com; 
> Richardson, Bruce
> <bruce.richard...@intel.com>; olivier.m...@6wind.com; 
> andrew.rybche...@oktetlabs.ru;
> akhil.go...@nxp.com; Doherty, Declan <declan.dohe...@intel.com>; Ankur 
> Dwivedi <adwiv...@marvell.com>;
> Anoob Joseph <ano...@marvell.com>; Guo, Jia <jia....@intel.com>; Wang, Haiyue 
> <haiyue.w...@intel.com>;
> Jerin Jacob <jer...@marvell.com>; Nithin Dabilpuram 
> <ndabilpu...@marvell.com>; Kiran Kumar K
> <kirankum...@marvell.com>; Nicolau, Radu <radu.nico...@intel.com>; Ray 
> Kinsella <m...@ashroe.eu>; Neil
> Horman <nhor...@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 <tho...@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.w...@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

Reply via email to