[dpdk-dev] [PATCH] vdpa/mlx5: use master core Id for vhost thread

Matan Azrad matan at mellanox.com
Tue Jul 28 09:30:30 CEST 2020



From: David Marchand
> On Tue, Jul 28, 2020 at 9:20 AM Matan Azrad <matan at mellanox.com> wrote:
> >
> >
> >
> > From: David Marchand
> > > On Tue, Jul 28, 2020 at 8:11 AM Xueming Li <xuemingl at mellanox.com>
> > > wrote:
> > > >
> > > > With latest rte api, vdpa example failed on vq setup, the api to
> > > > get event queue of specified core failed.
> > > >
> > > > The api to get event queue needs core id as input, but after
> > > > commit
> > > > 67ae5936c4fc36 ("eal: fix lcore accessors for non-EAL threads"),
> > > > code of "vhost-event" thread to get current core returns -1, an
> > > > invalid core id.
> > > >
> > > > As vhost thread created on same core of eal master core, this
> > > > patch uses master core ID as a workaround.
> > >
> > > rte_lcore_to_cpu_id(-1) is supposed to return the current lcore id.
> > > As explained in the commitlog of 67ae5936c4fc36, for a non-EAL
> > > thread (which has no associated lcore by default) calling this
> > > function means lcore_config[-1].core_id.
> >
> > Deosn't lcore mean core?
> 
> No.

So, it may be that we have more than one lcore working on a specific cpu_id?
Can you extend here?

> 
> > So, if the private thread run on a core that opened by EAL, Shouldn't
> > the API return the lcore of the private thread core?
> 
> vhost-events is a control thread.
> Was it working just by chance and returning 0 before?

Probably yes.
 
> --
> David Marchand



More information about the dev mailing list