From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 44B7AA00C2;
	Thu,  3 Nov 2022 11:15:47 +0100 (CET)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 23ECE40694;
	Thu,  3 Nov 2022 11:15:47 +0100 (CET)
Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com
 [66.111.4.27]) by mails.dpdk.org (Postfix) with ESMTP id D126940693
 for <dev@dpdk.org>; Thu,  3 Nov 2022 11:15:44 +0100 (CET)
Received: from compute4.internal (compute4.nyi.internal [10.202.2.44])
 by mailout.nyi.internal (Postfix) with ESMTP id 73F065C01EA;
 Thu,  3 Nov 2022 06:15:42 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute4.internal (MEProxy); Thu, 03 Nov 2022 06:15:42 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=
 cc:cc:content-transfer-encoding:content-type:date:date:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:sender:subject:subject:to:to; s=fm3; t=1667470542; x=
 1667556942; bh=PNyAd1IliSZhDPjppYiyAvCEEgRvECs3BKtRnow7VUg=; b=g
 4v73SkVNSQ3yc+FtD0h0SL3gwaDtwMIYgq6Ib8SnCzbpxxz8qGHhH0xitouogm+x
 00PVkw46CvUYyrROgjiCNz5cUBivit8/RJsAbAM9i3njsw+yK+FtzHWHlML9YFwJ
 yuwJZHpZbHBo8aSOPgMeGZTPgQcG6ejQMrR4F4RZ+dODd20qSlnDrshueWNDp2co
 8gFsMB7aZKjaupiT66kZQYPLylWSzwY2XdNUrcnMIqarr7QyqSfLXYbAvyVgH5qq
 jFIoGY33HQrRtO4exGAsuKEoS+BKovbGm2rk5f0i9O2oFW/5ybWkAkalcHNRiJG1
 QeFlkcpbaxVJE7TNbD3Pg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:date:date:feedback-id:feedback-id:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1667470542; x=
 1667556942; bh=PNyAd1IliSZhDPjppYiyAvCEEgRvECs3BKtRnow7VUg=; b=a
 bFYiqebQI9kqrS2ouAQHWIO0hizW9fyQ7FGvOwbtzSSsTDzAxbGXkkWZF4k0peuM
 UcdZt7FLdT4RVvOtY8Drv0NqSfmObZCQVatP+Gh15nX3fbFE12sJmhWzoIav1rUV
 weS1fOIVtScRyOmjsT8SGDyVIdYj5qUB6z77Uicj7sWRxhozTRoFWzBBAXmo+g/M
 hppsSLfGyYGC3tijjL3XF3X3T/vr0QmLJd0iXevddcW1f6hnJAGaohi/YN3GhbUf
 q/BrE75LgiS5fFq7IVD6Gj5Fnom8Jx2fMneMSL6CfZFcBiOYWJasxlXqaBpEE01D
 2oBi6upVJF9Xi2SjucPRw==
X-ME-Sender: <xms:zZRjY-qrbygiaP-cRjPyj6s0BRb0Mx9va5RZq0mDr1tXx7YJTlR6ZA>
 <xme:zZRjY8qKrjtpAQfR6oXDj9y66RbJR8MagapQJjZVp-aw9XpxQrx2jQdrAZ0EMnqxk
 1TuLNtnvO6Wb78Hug>
X-ME-Received: <xmr:zZRjYzPsmk9iaarh2baf9eQ-__3VEbArInwyuEczUr2PnPm0NazEYKnwvglMFvjTNDYRKM_cx3v5AyhSyuiuxA0jxA>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrudelgddtkecutefuodetggdotefrodftvf
 curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu
 uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc
 fjughrpefhvfevufffkfgjfhgggfgtsehtqhertddttddunecuhfhrohhmpefvhhhomhgr
 shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg
 ftrfgrthhtvghrnhepgeejiedvleehudfhuefgfeevgfehieetgeeigffggfffffeiuefg
 ueektdeffeevnecuffhomhgrihhnpeguphgukhdrohhrghenucevlhhushhtvghrufhiii
 gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhn
 rdhnvght
X-ME-Proxy: <xmx:zZRjY97PE1O2Wc60pf5b4LkrTCFWjlGlbwKLqJhjnnsdyGoj167Tug>
 <xmx:zZRjY965HI0wVIRoVg6O3dRaEkSYjilZ2Wo6SLTaQMRNCjPhIw9Q_g>
 <xmx:zZRjY9gzx0GjuEqMEuxuSfnrX8dxIatuRZbp9rx5SXWL49x3KIwRLg>
 <xmx:zpRjY_u48jcb0ii03HOjsWqzf_zbeYrEtNyPAHHxBZMj4MP97HKaWw>
Feedback-ID: i47234305:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu,
 3 Nov 2022 06:15:39 -0400 (EDT)
From: Thomas Monjalon <thomas@monjalon.net>
To: Morten =?ISO-8859-1?Q?Br=F8rup?= <mb@smartsharesystems.com>
Cc: David Marchand <david.marchand@redhat.com>, andrew.rybchenko@oktetlabs.ru,
 dev@dpdk.org, mattias.ronnblom@ericsson.com, jerinjacobk@gmail.com,
 bruce.richardson@intel.com, mdr@ashroe.eu, ktraynor@redhat.com,
 ian.stokes@intel.com, i.maximets@ovn.org, olivier.matz@6wind.com,
 konstantin.ananyev@intel.com, John McNamara <john.mcnamara@intel.com>,
 Marko Kovacevic <marko.kovacevic@intel.com>,
 Anatoly Burakov <anatoly.burakov@intel.com>,
 Neil Horman <nhorman@tuxdriver.com>,
 Harini Ramakrishnan <harini.ramakrishnan@microsoft.com>,
 Omar Cardona <ocardona@microsoft.com>, Pallavi Kadam <pallavi.kadam@intel.com>,
 Ranjit Menon <ranjit.menon@intel.com>
Subject: Re: [dpdk-dev] [PATCH v6 06/10] eal: register non-EAL threads as
 lcores
Date: Thu, 03 Nov 2022 11:15:37 +0100
Message-ID: <12730205.ZYm5mLc6kN@thomas>
In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35D8747E@smartserver.smartshare.dk>
References: <20200610144506.30505-1-david.marchand@redhat.com>
 <20200706205234.8040-7-david.marchand@redhat.com>
 <98CBD80474FA8B44BF855DF32C47DC35D8747E@smartserver.smartshare.dk>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="iso-8859-1"
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

03/11/2022 10:02, Morten Br=F8rup:
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of David Marchand
> > Sent: Monday, 6 July 2020 22.53
> >=20
> > DPDK allows calling some part of its API from a non-EAL thread but this
> > has some limitations.
> > OVS (and other applications) has its own thread management but still
> > want to avoid such limitations by hacking RTE_PER_LCORE(_lcore_id) and
> > faking EAL threads potentially unknown of some DPDK component.
> >=20
> > Introduce a new API to register non-EAL thread and associate them to a
> > free lcore with a new NON_EAL role.
> > This role denotes lcores that do not run DPDK mainloop and as such
> > prevents use of rte_eal_wait_lcore() and consorts.
> >=20
> > Multiprocess is not supported as the need for cohabitation with this
> > new
> > feature is unclear at the moment.
> >=20
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
> > Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
> > Acked-by: Thomas Monjalon <thomas@monjalon.net>
> > ---
>=20
> Following up on a two+ years old patch series, triggered by the discussio=
n [1] about statistics counters in the mempool library...
>=20
> The rte_lcore_role_t enum values are missing the RTE_ prefix, and the mea=
nings of the four values should be documented with comments in the source c=
ode.
>=20
> Also, the documentation [2] could benefit from some elaboration about the=
 lcore roles. I had to read the source code in depth to understand that eac=
h "registered non-EAL thread" has a unique lcore_id, which is not used by a=
ny other EAL or non-EAL thread.

You probably have the best point of view to improve the documentation.
=46eel free to work on a patch.

> [1]: http://inbox.dpdk.org/dev/98CBD80474FA8B44BF855DF32C47DC35D8747D@sma=
rtserver.smartshare.dk/T/#u
> [2]: http://doc.dpdk.org/guides/prog_guide/env_abstraction_layer.html#mul=
tiple-pthread