> -----Original Message----- > From: Jerin Jacob <[email protected]> > Sent: Wednesday, June 7, 2023 9:29 PM > To: Yan, Zhirun <[email protected]> > Cc: [email protected]; [email protected]; [email protected]; > [email protected]; [email protected]; > [email protected]; Liang, Cunming <[email protected]>; Wang, > Haiyue <[email protected]>; mattias.ronnblom > <[email protected]> > 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 <[email protected]> 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.

