[PATCH v9 04/17] graph: add get/set graph worker model APIs

Yan, Zhirun zhirun.yan at intel.com
Thu Jun 8 05:08:40 CEST 2023



> -----Original Message-----
> From: Jerin Jacob <jerinjacobk at gmail.com>
> Sent: Wednesday, June 7, 2023 9:29 PM
> To: Yan, Zhirun <zhirun.yan at intel.com>
> Cc: dev at dpdk.org; jerinj at marvell.com; kirankumark at marvell.com;
> ndabilpuram at marvell.com; stephen at networkplumber.org;
> pbhagavatula at marvell.com; Liang, Cunming <cunming.liang at intel.com>; Wang,
> Haiyue <haiyue.wang at intel.com>; mattias.ronnblom
> <mattias.ronnblom at ericsson.com>
> Subject: Re: [PATCH v9 04/17] graph: add get/set graph worker model APIs
> 
> On Wed, Jun 7, 2023 at 5:55 PM Yan, Zhirun <zhirun.yan at intel.com> wrote:
> >
> > > > +__rte_experimental
> > > > +static inline uint32_t
> > > > +rte_graph_worker_model_get(struct rte_graph *graph) {
> > > > +       if (!graph_model_is_valid(graph->model))
> > > > +               return -EINVAL;
> > >
> > > Introduce rte_graph_worker_model_no_check_get() to skip this check
> > > to use with fastpath.
> > >
> > > rte_graph_worker_model_get can move to .c file.
> >
> > Yes. Will move in next version.
> > Got it. rte_graph_worker_model_no_check_get() will be used in fast path.
> > Actually, I don’t find the performance impact about static inline, so
> > should the new
> 
> May be due to burst size 32 or 256.it will start impacting if burst size is less.
> 

In my test, the impact still small.
But I understand your point. If the walk() be called much more, it will call much get().
The burst size will impact the node->obj[] size, and then cause much walk loop. Thanks.

> 
> > API declared with static inline keywords or put it into .c file also?
> 
> Keep in line fastpath function in .h as inline.

The declare of inline is just a suggestion for compiler. The compiler will decide to inline or not.
Got it. I will change in next version.



More information about the dev mailing list