DPDK patches and discussions
 help / color / mirror / Atom feed
From: Matan Azrad <matan@mellanox.com>
To: "Xueming(Steven) Li" <xuemingl@mellanox.com>,
	David Marchand <david.marchand@redhat.com>
Cc: dev <dev@dpdk.org>, Asaf Penso <asafp@mellanox.com>
Subject: Re: [dpdk-dev] [PATCH] vdpa/mlx5: use master core Id for vhost thread
Date: Tue, 28 Jul 2020 08:27:36 +0000	[thread overview]
Message-ID: <AM0PR0502MB40193B5646D6DB76F9208525D2730@AM0PR0502MB4019.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <AM0PR05MB5204C8E7DFE4F43F641CF3C7AC730@AM0PR05MB5204.eurprd05.prod.outlook.com>

Hi David

We found that our kernel driver  doesn't really need it and we didn't understand
the internal API correctly.

We will create v2 as fix to the vdpa code. 

Thank you for the review!

Matan

From: Xueming(Steven) Li:
> > -----Original Message-----
> > From: David Marchand <david.marchand@redhat.com>
> > Sent: Tuesday, July 28, 2020 3:53 PM
> > To: Matan Azrad <matan@mellanox.com>
> > Cc: Xueming(Steven) Li <xuemingl@mellanox.com>; dev <dev@dpdk.org>;
> > Asaf Penso <asafp@mellanox.com>
> > Subject: Re: [dpdk-dev] [PATCH] vdpa/mlx5: use master core Id for
> > vhost thread
> >
> > On Tue, Jul 28, 2020 at 9:30 AM Matan Azrad <matan@mellanox.com>
> wrote:
> > > > > > 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?
> >
> > A control thread is a non-EAL thread.
> 
> Is the default thread a control thread? After eal init, rte_lcore_to_cpu_id(-1)
> returns 0.
> 
> In function rte_ctrl_thread_create(), the new thread is set cpu affinity with
> control cpu set, bind it same core of default control thread.
> 
> > A non-EAL thread has no lcore associated (unless you call the newly
> > added rte_thread_register API).
> >
> > Not sure why you need the physical core identifier in the driver.
> >
> > It is possible that non-EAL threads run on one physical core if you
> > start your application with the right cpuset.
> > But without checking, you can't make such an assumption.
> >
> >
> > >
> > > >
> > > > > 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.
> >
> > (gdb) info symbol &lcore_config[-1].core_id vfio_cfgs + 444820 in
> > section .bss of
> > /home/dmarchan/git/pub/dpdk.org/build/app/../lib/librte_eal.so.20.0
> >
> > Please, update the commitlog.
> > Thanks.
> >
> >
> > --
> > David Marchand


  reply	other threads:[~2020-07-28  8:27 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-28  6:11 Xueming Li
2020-07-28  6:22 ` [dpdk-dev] [v1] vdpa/mlx5: use control " Xueming Li
2020-07-28  7:08 ` [dpdk-dev] [PATCH] vdpa/mlx5: use master " David Marchand
2020-07-28  7:19   ` Matan Azrad
2020-07-28  7:25     ` David Marchand
2020-07-28  7:30       ` Matan Azrad
2020-07-28  7:53         ` David Marchand
2020-07-28  8:06           ` Xueming(Steven) Li
2020-07-28  8:27             ` Matan Azrad [this message]
2020-07-28  8:30               ` David Marchand
2020-07-28  8:24 ` Xueming(Steven) Li
2020-07-28  9:22 ` [dpdk-dev] [v2] vdpa/mlx5: fix event queue number query Xueming Li
2020-07-28 12:05   ` David Marchand
2020-07-28 12:26     ` Xueming(Steven) Li
2020-07-28 12:32 ` [dpdk-dev] [v3] " Xueming Li
2020-07-28 14:04   ` Maxime Coquelin
2020-07-28 15:55   ` Maxime Coquelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AM0PR0502MB40193B5646D6DB76F9208525D2730@AM0PR0502MB4019.eurprd05.prod.outlook.com \
    --to=matan@mellanox.com \
    --cc=asafp@mellanox.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=xuemingl@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).