On Wed, Jun 7, 2023 at 5:56 PM Yan, Zhirun <zhirun....@intel.com> wrote: > > > > > -----Original Message----- > > From: Jerin Jacob <jerinjac...@gmail.com> > > Sent: Wednesday, June 7, 2023 4:27 PM > > To: Yan, Zhirun <zhirun....@intel.com> > > Cc: dev@dpdk.org; jer...@marvell.com; kirankum...@marvell.com; > > ndabilpu...@marvell.com; step...@networkplumber.org; > > pbhagavat...@marvell.com; Liang, Cunming <cunming.li...@intel.com>; Wang, > > Haiyue <haiyue.w...@intel.com>; mattias.ronnblom > > <mattias.ronnb...@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....@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().
Got it. But I think, You can treat !RTE_GRAPH_MODEL_SELECT as GRAPH_MODEL_MCORE_RUNTIME_SELECT without introducing new one by ifndef RTE_GRAPH_MODEL_SELECT. No strong opinion. > > 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 #define RTE_GRAPH_MODEL_SELECT RTE_GRAPH_MODEL_RTC -> means rtc_walk() #define RTE_GRAPH_MODEL_SELECT RTE_GRAPH_MODEL_MCORE_DISPATCH -> means mcore_dispatch_walk() #undef RTE_GRAPH_MODEL_SELECT or not defined - it reads graph->model to pick the model Could you tell any issue with it? > rte_graph_walk() in patch > 13(http://patchwork.dpdk.org/project/dpdk/patch/20230607035144.1214492-14-zhirun....@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 >