[PATCH v9 15/17] examples/l3fwd-graph: introduce multicore dispatch worker model
Yan, Zhirun
zhirun.yan at intel.com
Wed Jun 7 14:26:03 CEST 2023
> -----Original Message-----
> From: Jerin Jacob <jerinjacobk at gmail.com>
> Sent: Wednesday, June 7, 2023 4:27 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; stephen at networkplumber.org;
> pbhagavatula at marvell.com; Liang, Cunming <cunming.liang at intel.com>; Wang,
> Haiyue <haiyue.wang at intel.com>; mattias.ronnblom
> <mattias.ronnblom at ericsson.com>
> Subject: Re: [PATCH v9 15/17] examples/l3fwd-graph: introduce multicore
> dispatch worker model
>
> 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
GRAPH_MODEL_MCORE_RUNTIME_SELECT is defined in app. And it will hit rte_graph_walk()
"else" case to get model and select walk_rtc()/walk_dispatch().
It is not the same as !RTE_GRAPH_MODEL_SELECT.
GRAPH_MODEL_MCORE_RUNTIME_SELECT means to select in runtime.
!RTE_GRAPH_MODEL_SELECT means to use the default rtc_walk(), it will hit the first case in
rte_graph_walk() in patch 13(http://patchwork.dpdk.org/project/dpdk/patch/20230607035144.1214492-14-zhirun.yan@intel.com/)
Should I put it with other model definition?
If yes, I prefer to put it the first one in patch 04, like:
+#define GRAPH_MODEL_MCORE_RUNTIME_SELECT 0
#define RTE_GRAPH_MODEL_RTC 1
#define RTE_GRAPH_MODEL_MCORE_DISPATCH 2
#define RTE_GRAPH_MODEL_DEFAULT RTE_GRAPH_MODEL_RTC
>
> > 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.
>
Ok, will update in next version.
>
> > 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.
Yes, I will remove these in next version. Thanks.
>
> > + /* parsing model in
> > +cmdline. */ #undef RTE_GRAPH_MODEL_SELECT
More information about the dev
mailing list