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

Jerin Jacob jerinjacobk at gmail.com
Tue Jun 6 08:39:53 CEST 2023


On Tue, Jun 6, 2023 at 12:04 PM Yan, Zhirun <zhirun.yan at intel.com> wrote:
>
>
>
> > >
> > > And change it to
> > >
> > > If (!graph_model_is_valid()) {
> > >   model = RTE_GRAPH_MODEL_DEFAULT;
> >
> > Since it returning from below, Do we need to update model?
> >
> No, no need to update it. I reset model here cause I want to reset all graph->model,
> But miss the graph loop. I think it is no need to update all graph->model also.
> I will remove it and return directly.
>
> > >   return -EINVAL;
> > > }
> > > STAILQ_FOREACH(graph, graph_head, next)
> > >     graph->graph->model = model;
> >
> > graph->model = model. Right?
> No. This graph is struct graph, and we put model into struct rte_graph.
> So it is
> (struct graph) graph -> (struct rte_graph *) graph -> model

Got it.


More information about the dev mailing list