On Tue, Jul 28, 2020 at 9:20 AM Matan Azrad <ma...@mellanox.com> wrote: > > > > From: David Marchand > > On Tue, Jul 28, 2020 at 8:11 AM Xueming Li <xuemi...@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, 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? -- David Marchand