28/10/2020 05:54, Jerin Jacob: > On Wed, Oct 28, 2020 at 2:35 AM Thomas Monjalon <tho...@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 <tho...@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? > > + 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?