[PATCH v3 04/15] graph: add get/set graph worker model APIs
Yan, Zhirun
zhirun.yan at intel.com
Thu Mar 30 05:37:10 CEST 2023
> -----Original Message-----
> From: Stephen Hemminger <stephen at networkplumber.org>
> Sent: Wednesday, March 29, 2023 11:35 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; Liang, Cunming <cunming.liang at intel.com>; Wang,
> Haiyue <haiyue.wang at intel.com>
> Subject: Re: [PATCH v3 04/15] graph: add get/set graph worker model APIs
>
> On Wed, 29 Mar 2023 15:43:29 +0900
> Zhirun Yan <zhirun.yan at intel.com> wrote:
>
> > +
> > +/**
> > + * @warning
> > + * @b EXPERIMENTAL: this API may change, or be removed, without prior
> > +notice
> > + * Set the graph worker model
> > + *
> > + * @note This function does not perform any locking, and is only safe to call
> > + * before graph running.
> > + *
> > + * @param name
> > + * Name of the graph worker model.
> > + *
> > + * @return
> > + * 0 on success, -1 otherwise.
> > + */
> > +inline int
> > +rte_graph_worker_model_set(enum rte_graph_worker_model model) {
> > + if (model >= RTE_GRAPH_MODEL_LIST_END)
> > + goto fail;
> > +
> > + RTE_PER_LCORE(worker_model) = model;
> > + return 0;
> > +
> > +fail:
> > + RTE_PER_LCORE(worker_model) = RTE_GRAPH_MODEL_DEFAULT;
> > + return -1;
> > +}
> > +
>
> Once again, this doesn't have to be inline, could be a real API.
Thanks, I will remove inline in next version.
More information about the dev
mailing list