[PATCH v9 15/17] examples/l3fwd-graph: introduce multicore dispatch worker model

Jerin Jacob jerinjacobk at gmail.com
Wed Jun 7 10:27:17 CEST 2023


On Wed, Jun 7, 2023 at 9:30 AM Zhirun Yan <zhirun.yan at intel.com> wrote:
>
> Add new parameter "model" to choose mcore dispatch or rtc model.
> And in dispatch model, the node will affinity to worker core successively.
>
> Note:
> RTE_GRAPH_MODEL_SELECT is set to GRAPH_MODEL_RTC by default. Must set
> model the same as RTE_GRAPH_MODEL_SELECT If set it as rtc or mcore
> dispatch explicitly. GRAPH_MODEL_MCORE_RUNTIME_SELECT means it could
> choose by model in runtime.

Now no GRAPH_MODEL_MCORE_RUNTIME_SELECT. Right? it same as
!RTE_GRAPH_MODEL_SELECT

> Only support one RX node for mcore dispatch model in current
> implementation.
>
> ./dpdk-l3fwd-graph  -l 8,9,10,11 -n 4 -- -p 0x1 --config="(0,0,9)" -P
> --model="dispatch"

Please update doc/guides/sample_app_ug/l3_forward_graph.rst for new
model option and example command line
and relevant detail on RTE_GRAPH_MODEL_SELECT scheme.


> 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>
> ---
>  examples/l3fwd-graph/main.c | 231 ++++++++++++++++++++++++++++++------
>  1 file changed, 193 insertions(+), 38 deletions(-)
>
> diff --git a/examples/l3fwd-graph/main.c b/examples/l3fwd-graph/main.c
> index 5feeab4f0f..77a5a98aec 100644
> --- a/examples/l3fwd-graph/main.c
> +++ b/examples/l3fwd-graph/main.c
> @@ -23,6 +23,12 @@
>  #include <rte_cycles.h>
>  #include <rte_eal.h>
>  #include <rte_ethdev.h>
> +#define GRAPH_MODEL_RTC 0 /* Run-to-completion model, set by default. */
> +#define GRAPH_MODEL_MCORE_DISPATCH 1 /* Dispatch model. */
> +#define GRAPH_MODEL_MCORE_RUNTIME_SELECT 2 /* Support to select model by */

Duplication from public header file. Not needed.

> +                                          /* parsing model in cmdline. */
> +#undef RTE_GRAPH_MODEL_SELECT


More information about the dev mailing list