[PATCH v1 04/13] graph: add get/set graph worker model APIs
Jerin Jacob
jerinjacobk at gmail.com
Mon Feb 20 14:50:42 CET 2023
On Thu, Nov 17, 2022 at 10:40 AM Zhirun Yan <zhirun.yan at intel.com> wrote:
>
> Add new get/set APIs to configure graph worker model which is used to
> determine which model will be chosen.
>
> 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>
> ---
> lib/graph/rte_graph_worker.h | 51 +++++++++++++++++++++++++++++
> lib/graph/rte_graph_worker_common.h | 13 ++++++++
> lib/graph/version.map | 3 ++
> 3 files changed, 67 insertions(+)
>
> diff --git a/lib/graph/rte_graph_worker.h b/lib/graph/rte_graph_worker.h
> index 54d1390786..a0ea0df153 100644
> --- a/lib/graph/rte_graph_worker.h
> +++ b/lib/graph/rte_graph_worker.h
> @@ -1,5 +1,56 @@
> #include "rte_graph_model_rtc.h"
>
> +static enum rte_graph_worker_model worker_model = RTE_GRAPH_MODEL_DEFAULT;
This will break the multiprocess.
> +
> +/** Graph worker models */
> +enum rte_graph_worker_model {
> +#define WORKER_MODEL_DEFAULT "default"
Why need strings?
Also, every symbol in a public header file should start with RTE_ to
avoid namespace conflict.
> + RTE_GRAPH_MODEL_DEFAULT = 0,
> +#define WORKER_MODEL_RTC "rtc"
> + RTE_GRAPH_MODEL_RTC,
Why not RTE_GRAPH_MODEL_RTC = RTE_GRAPH_MODEL_DEFAULT in enum itself.
> +#define WORKER_MODEL_GENERIC "generic"
Generic is a very overloaded term. Use pipeline here i.e
RTE_GRAPH_MODEL_PIPELINE
> + RTE_GRAPH_MODEL_GENERIC,
> + RTE_GRAPH_MODEL_MAX,
No need for MAX, it will break the ABI for future. See other subsystem
such as cryptodev.
> +};
>
More information about the dev
mailing list