[dpdk-dev] [PATCH v3 12/15] app/eventdev: switch flow ID to dynamic mbuf field

Jerin Jacob jerinjacobk at gmail.com
Wed Oct 28 09:06:28 CET 2020


On Wed, Oct 28, 2020 at 1:13 PM Thomas Monjalon <thomas at monjalon.net> wrote:
>
> 28/10/2020 05:54, Jerin Jacob:
> > On Wed, Oct 28, 2020 at 2:35 AM Thomas Monjalon <thomas at monjalon.net> wrote:
> > >
> > > The order test stored the flow ID in the deprecated mbuf field udata64.
> > > It is moved to a dynamic field in order to allow removal of udata64.
> > >
> > > Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
> > > ---
> > > +       static const struct rte_mbuf_dynfield flow_id_dynfield_desc = {
> > > +               .name = "test_event_dynfield_flow_id",
> > > +               .size = sizeof(flow_id_t),
> > > +               .align = __alignof__(flow_id_t),
> > > +       };
> > > +       flow_id_dynfield_offset =
> > > +               rte_mbuf_dynfield_register(&flow_id_dynfield_desc);
> >
> >
> > Since this path used in fastpath, could you move flow_id_dynfield_offset to
> > test_order's initial entry as that cache will be warm always.
>
> I don't understand. Are you talking about the offset value?
> This field will be in the second part of mbuf, as udata64 was.
> Or are you talking about the storage of the offset variable?

Yes. Storage of the offset variable.

>
> > > +       if (flow_id_dynfield_offset < 0) {
> > > +               evt_err("failed to register mbuf field");
> > > +               return -rte_errno;
> > > +       }
> > > +
> > >         test_order = rte_zmalloc_socket(test->name, sizeof(struct test_order),
> > >                                 RTE_CACHE_LINE_SIZE, opt->socket_id);
> >
> > See above
>
> You mean the offset should be stored in this struct test_order?

Yes. Instead of a global variable flow_id_dynfield_offset

>
>
>


More information about the dev mailing list