[dpdk-dev] [PATCH 05/15] security: switch metadata to dynamic mbuf field
Thomas Monjalon
thomas at monjalon.net
Mon Oct 26 15:30:00 CET 2020
26/10/2020 11:41, David Marchand:
> On Mon, Oct 26, 2020 at 6:21 AM Thomas Monjalon <thomas at monjalon.net> wrote:
> > +/* 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?
Yes,
and the inline function below can be a simple macro.
> > +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 *);
> > +}
More information about the dev
mailing list