[dpdk-dev] [PATCH 05/15] security: switch metadata to dynamic mbuf field
Akhil Goyal
akhil.goyal at nxp.com
Mon Oct 26 18:58:10 CET 2020
> On Mon, Oct 26, 2020 at 6:21 AM Thomas Monjalon <thomas at monjalon.net>
> wrote:
> > diff --git a/lib/librte_security/rte_security_driver.h
> b/lib/librte_security/rte_security_driver.h
> > index 1b561f8528..ba9691b4a0 100644
> > --- a/lib/librte_security/rte_security_driver.h
> > +++ b/lib/librte_security/rte_security_driver.h
> > @@ -17,6 +17,8 @@
> > extern "C" {
> > #endif
> >
> > +#include <rte_mbuf_dyn.h>
> > +
> > #include "rte_security.h"
> >
> > /**
> > @@ -89,6 +91,24 @@ typedef int (*security_session_stats_get_t)(void
> *device,
> > struct rte_security_session *sess,
> > struct rte_security_stats *stats);
> >
> > +/* Dynamic mbuf field for device-specific metadata */
> > +static const struct rte_mbuf_dynfield rte_security_dynfield_desc = {
> > + .name = RTE_SECURITY_DYNFIELD_NAME,
> > + .size = sizeof(RTE_SECURITY_DYNFIELD_TYPE),
> > + .align = __alignof__(RTE_SECURITY_DYNFIELD_TYPE),
> > +};
>
> Should be in rte_security.c?
>
>
> > +extern int rte_security_dynfield_offset;
> > +
> > +__rte_experimental
> > +int rte_security_dynfield_register(void);
> > +
> > +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 *);
> > +}
code indentation -
Atleast one more tab before rte_security_dynfield_offset, RTE_SECURITY_DYNFIELD_TYPE *).
More information about the dev
mailing list