[PATCH v9 06/17] graph: introduce graph bind unbind API
Jerin Jacob
jerinjacobk at gmail.com
Wed Jun 7 09:59:54 CEST 2023
On Wed, Jun 7, 2023 at 9:30 AM Zhirun Yan <zhirun.yan at 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.wang at intel.com>
> Signed-off-by: Cunming Liang <cunming.liang at intel.com>
> Signed-off-by: Zhirun Yan <zhirun.yan at 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 <jerinj at marvell.com>
More information about the dev
mailing list