On Wed, Jun 7, 2023 at 9:30 AM Zhirun Yan <zhirun....@intel.com> wrote: > > Add lcore_id for graph to hold affinity core id where graph would run on. > Add bind/unbind API to set/unset graph affinity attribute. lcore_id will > be set as MAX by default, it means not enable this attribute. > > Signed-off-by: Haiyue Wang <haiyue.w...@intel.com> > Signed-off-by: Cunming Liang <cunming.li...@intel.com> > Signed-off-by: Zhirun Yan <zhirun....@intel.com>
> +int > +rte_graph_model_mcore_dispatch_core_bind(rte_graph_t id, int lcore) > +{ > + struct graph *graph; > + > + GRAPH_ID_CHECK(id); > + if (!rte_lcore_is_enabled(lcore)) > + SET_ERR_JMP(ENOLINK, fail, "lcore %d not enabled", lcore); > + > + STAILQ_FOREACH(graph, &graph_list, next) > + if (graph->id == id) > + break; > + > + RTE_ASSERT(graph->graph->model == RTE_GRAPH_MODEL_MCORE_DISPATCH); No assert in library or slowpath. Return error. With that change Acked-by: Jerin Jacob <jer...@marvell.com>