[PATCH] graph: fix head move when graph walk in mcore dispatch

Yan, Zhirun zhirun.yan at intel.com
Thu Mar 21 06:34:00 CET 2024



> -----Original Message-----
> From: Wu, Jingjing <jingjing.wu at intel.com>
> Sent: Thursday, March 21, 2024 11:39 AM
> To: Yan, Zhirun <zhirun.yan at intel.com>; dev at dpdk.org
> Cc: jerinj at marvell.com; pbhagavatula at marvell.com; stable at dpdk.org
> Subject: RE: [PATCH] graph: fix head move when graph walk in mcore dispatch
> 
> 
> 
> > -----Original Message-----
> > From: Yan, Zhirun <zhirun.yan at intel.com>
> > Sent: Wednesday, March 20, 2024 4:43 PM
> > To: Wu, Jingjing <jingjing.wu at intel.com>; dev at dpdk.org
> > Cc: jerinj at marvell.com; pbhagavatula at marvell.com; stable at dpdk.org
> > Subject: RE: [PATCH] graph: fix head move when graph walk in mcore
> > dispatch
> >
> >
> >
> > > -----Original Message-----
> > > From: Wu, Jingjing <jingjing.wu at intel.com>
> > > Sent: Wednesday, March 20, 2024 2:25 PM
> > > To: Yan, Zhirun <zhirun.yan at intel.com>; dev at dpdk.org
> > > Cc: jerinj at marvell.com; pbhagavatula at marvell.com; stable at dpdk.org
> > > Subject: RE: [PATCH] graph: fix head move when graph walk in mcore
> > dispatch
> > >
> > >
> > > > >  		/* skip the src nodes which not bind with current worker */
> > > > >  		if ((int32_t)head < 0 && node->dispatch.lcore_id != graph-
> > > > > >dispatch.lcore_id)
> > > > >  			continue;
> > > > > -
> > > > > +		head++;
> > > > If current src node not bind with current core, It will go into infinite loop.
> > > > This line would have no chance to run.
> > >
> > > Seems reasonable, it might be OK to change "head<0" to "head <1" the
> > condition
> > > check?
> >
> > No. "head<0" means it is src node.
> > All src node would put before head = 0.  "Head<1" is confused.
> > You could find the details of graph reel under rte_graph_walk_rtc() in
> > lib/graph/rte_graph_model_rtc.h
> >
> > I guess if there are some src node missed, it may be caused by wrong
> > config, for example, the missed src node not pin to a lcore.
> > Use rte_graph_model_mcore_dispatch_node_lcore_affinity_set() to pin
> > the src node first.
> 
> I don't think it is confusing because head++ happens before head < 0 check.
I agree to change it to "head < 1"

> Yes, it happens when lcore affinity is not set.
> For example, we have two source nodes, both of them have no lcore affinity
> setting.
> By current code, the second node will also be executed which is not as expected.
> 
> Thanks
> Jingjing


More information about the stable mailing list