[DPDK/core Bug 1706] CPU affinity of registered non-EAL threads not reflected in lcore configuration

2025-05-14 Thread bugzilla
https://bugs.dpdk.org/show_bug.cgi?id=1706 Bug ID: 1706 Summary: CPU affinity of registered non-EAL threads not reflected in lcore configuration Product: DPDK Version: 25.03 Hardware: All OS: All

[DPDK/core Bug 1524] rte_lcore API treats Service cores and Registered Non-EAL threads as disabled

2024-08-20 Thread bugzilla
https://bugs.dpdk.org/show_bug.cgi?id=1524 Bug ID: 1524 Summary: rte_lcore API treats Service cores and Registered Non-EAL threads as disabled Product: DPDK Version: 24.07 Hardware: All OS: All

Re: [PATCH v1 1/1] eal/random: fix random state initialization for non-eal threads

2023-10-04 Thread Burakov, Anatoly
state reserved for non-EAL threads, which is not initialized. Fix it by initializing this extra state. Fixes: 3f002f069612 ("eal: replace libc-based random generation with LFSR") Cc: mattias.ronnb...@ericsson.com Cc: sta...@dpdk.org Signed-off-by: Anatoly Burakov We have two series for

Re: [PATCH v2 1/2] random: initialize the random state for non-EAL threads

2023-10-04 Thread David Marchand
On Mon, Oct 2, 2023 at 2:28 PM Mattias Rönnblom wrote: > > On 2023-09-07 17:24, Stephen Hemminger wrote: > > The per-lcore PRNG was not initializing the rand_state of all > > the lcores. Any usage of rte_random by a non-EAL lcore would > > "/../ by an unregistered non-EAL thread /../" > > > use ra

Re: [PATCH v2 1/2] random: initialize the random state for non-EAL threads

2023-10-02 Thread Mattias Rönnblom
On 2023-09-07 17:24, Stephen Hemminger wrote: The per-lcore PRNG was not initializing the rand_state of all the lcores. Any usage of rte_random by a non-EAL lcore would "/../ by an unregistered non-EAL thread /../" use rand_states[RTE_MAX_LCORE] which was never initialized. Fix by using RTE_

Re: [PATCH v1 1/1] eal/random: fix random state initialization for non-eal threads

2023-10-02 Thread Mattias Rönnblom
state reserved for non-EAL threads, which is not initialized. Fix it by initializing this extra state. Fixes: 3f002f069612 ("eal: replace libc-based random generation with LFSR") Cc: mattias.ronnb...@ericsson.com Cc: sta...@dpdk.org Signed-off-by: Anatoly Burakov We have two series for

RE: [PATCH v1 1/1] eal/random: fix random state initialization for non-eal threads

2023-10-02 Thread Morten Brørup
> rand state is initialized up until RTE_MAX_LCORE'th rand state. However, > > rand state also has one extra rand state reserved for non-EAL threads, > > which is not initialized. Fix it by initializing this extra state. > > > > Fixes: 3f002f069612 ("eal: replace libc-

RE: [PATCH v2 1/2] random: initialize the random state for non-EAL threads

2023-10-02 Thread Morten Brørup
> From: Stephen Hemminger [mailto:step...@networkplumber.org] > Sent: Thursday, 7 September 2023 17.25 > > The per-lcore PRNG was not initializing the rand_state of all > the lcores. Any usage of rte_random by a non-EAL lcore would > use rand_states[RTE_MAX_LCORE] which was never initialized. > >

Re: [PATCH v1 1/1] eal/random: fix random state initialization for non-eal threads

2023-10-02 Thread David Marchand
Hello guys, On Mon, Aug 28, 2023 at 2:07 PM Anatoly Burakov wrote: > > Currently, the rte_rand() state is initialized with seed, and each > rand state is initialized up until RTE_MAX_LCORE'th rand state. However, > rand state also has one extra rand state reserved for non-EAL th

Re: [PATCH v2 2/2] random: make rte_rand() thread safe for non-EAL threads

2023-09-09 Thread Mattias Rönnblom
On 2023-09-08 22:56, Stephen Hemminger wrote: On Fri, 8 Sep 2023 22:48:54 +0200 Mattias Rönnblom wrote: On 2023-09-07 17:24, Stephen Hemminger wrote: Add missing locking so that if two non-EAL threads call rte_rand() they will not corrupt the per-thread state. Fixes: 3f002f069612 (&quo

Re: [PATCH v2 2/2] random: make rte_rand() thread safe for non-EAL threads

2023-09-08 Thread Stephen Hemminger
On Fri, 8 Sep 2023 22:48:54 +0200 Mattias Rönnblom wrote: > On 2023-09-07 17:24, Stephen Hemminger wrote: > > Add missing locking so that if two non-EAL threads call rte_rand() > > they will not corrupt the per-thread state. > > > > Fixes: 3f002f069612 (&quo

Re: [PATCH v2 2/2] random: make rte_rand() thread safe for non-EAL threads

2023-09-08 Thread Mattias Rönnblom
On 2023-09-07 17:24, Stephen Hemminger wrote: Add missing locking so that if two non-EAL threads call rte_rand() they will not corrupt the per-thread state. Fixes: 3f002f069612 ("eal: replace libc-based random generation with LFSR") The API documentation clearly states that no

Re: [PATCH v2 2/2] random: make rte_rand() thread safe for non-EAL threads

2023-09-07 Thread David Marchand
te_random.c index 02b6b6b97b..3f2a4830fd 100644 --- a/lib/eal/common/rte_random.c +++ b/lib/eal/common/rte_random.c @@ -128,20 +128,22 @@ struct rte_rand_state *__rte_rand_get_state(void) idx = rte_lcore_id(); /* last instance reserved for unregistered non-EAL threads */ - if (unlik

[PATCH v2 2/2] random: make rte_rand() thread safe for non-EAL threads

2023-09-07 Thread Stephen Hemminger
Add missing locking so that if two non-EAL threads call rte_rand() they will not corrupt the per-thread state. Fixes: 3f002f069612 ("eal: replace libc-based random generation with LFSR") Signed-off-by: Stephen Hemminger --- lib/eal/common/rte_ran

[PATCH v2 1/2] random: initialize the random state for non-EAL threads

2023-09-07 Thread Stephen Hemminger
The per-lcore PRNG was not initializing the rand_state of all the lcores. Any usage of rte_random by a non-EAL lcore would use rand_states[RTE_MAX_LCORE] which was never initialized. Fix by using RTE_DIM() which will get all lcores. Fixes: 3f002f069612 ("eal: replace libc-based random generation

[PATCH v2 0/2] fixes to rte_random for non-EAL threads

2023-09-07 Thread Stephen Hemminger
While examining the code for rte_random, noticed a couple of existing bugs around use of rte_rand() by non-EAL threads Stephen Hemminger (2): random: initialize the random state for non-EAL threads random: make rte_rand() thread safe for non-EAL threads lib/eal/common/rte_random.c | 56

RE: [PATCH v1 1/1] eal/random: fix random state initialization for non-eal threads

2023-08-28 Thread Morten Brørup
#x27;th rand state. > However, > > rand state also has one extra rand state reserved for non-EAL threads, > > which is not initialized. Fix it by initializing this extra state. > > > > Fixes: 3f002f069612 ("eal: replace libc-based random generation with > LFSR

Re: [PATCH v1 1/1] eal/random: fix random state initialization for non-eal threads

2023-08-28 Thread Mattias Rönnblom
On 2023-08-28 14:06, Anatoly Burakov wrote: Currently, the rte_rand() state is initialized with seed, and each rand state is initialized up until RTE_MAX_LCORE'th rand state. However, rand state also has one extra rand state reserved for non-EAL threads, which is not initialized. Fix

[PATCH v1 1/1] eal/random: fix random state initialization for non-eal threads

2023-08-28 Thread Anatoly Burakov
Currently, the rte_rand() state is initialized with seed, and each rand state is initialized up until RTE_MAX_LCORE'th rand state. However, rand state also has one extra rand state reserved for non-EAL threads, which is not initialized. Fix it by initializing this extra state. Fixes: 3f002f0

Re: [PATCH] eal: have unregistered non-EAL threads use dedicated PRNG

2023-02-10 Thread David Marchand
On Mon, Dec 5, 2022 at 11:08 AM Mattias Rönnblom wrote: > > Prior to this change, unregistered non-EAL threads shared a PRNG > instance with the main lcore. The main lcore may well be used for fast > path processing, potentially making rte_rand() calls in the > process. It sho

Re: [PATCH] eal: have unregistered non-EAL threads use dedicated PRNG

2022-12-06 Thread Mattias Rönnblom
On 2022-12-05 11:58, Morten Brørup wrote: >> From: Mattias Rönnblom [mailto:mattias.ronnb...@ericsson.com] >> Sent: Monday, 5 December 2022 11.04 >> >> Prior to this change, unregistered non-EAL threads shared a PRNG >> instance with the main lcore. The main lcore may

RE: [PATCH] eal: have unregistered non-EAL threads use dedicated PRNG

2022-12-05 Thread Morten Brørup
> From: Mattias Rönnblom [mailto:mattias.ronnb...@ericsson.com] > Sent: Monday, 5 December 2022 11.04 > > Prior to this change, unregistered non-EAL threads shared a PRNG > instance with the main lcore. The main lcore may well be used for fast > path processing, potential

[PATCH] eal: have unregistered non-EAL threads use dedicated PRNG

2022-12-05 Thread Mattias Rönnblom
Prior to this change, unregistered non-EAL threads shared a PRNG instance with the main lcore. The main lcore may well be used for fast path processing, potentially making rte_rand() calls in the process. It should not need to synchronize with control threads. With this change, all unregistered

[PATCH v5 2/3] mempool: add stats for unregistered non-EAL threads

2022-11-09 Thread Morten Brørup
This patch adds statistics for unregistered non-EAL threads, which was previously not included in the statistics. Add one more entry to the stats array, and use the last index for unregistered non-EAL threads. The unregistered non-EAL thread statistics are incremented atomically. In theory, the

Re: [PATCH v4 2/3] mempool: add stats for unregistered non-EAL threads

2022-11-06 Thread Andrew Rybchenko
On 11/4/22 15:03, Morten Brørup wrote: This patch adds statistics for unregistered non-EAL threads, which was previously not included in the statistics. Add one more entry to the stats array, and use the last index for unregistered non-EAL threads. The unregistered non-EAL thread statistics

[PATCH v4 2/3] mempool: add stats for unregistered non-EAL threads

2022-11-04 Thread Morten Brørup
This patch adds statistics for unregistered non-EAL threads, which was previously not included in the statistics. Add one more entry to the stats array, and use the last index for unregistered non-EAL threads. The unregistered non-EAL thread statistics are incremented atomically. In theory, the

[PATCH v3 2/3] mempool: add stats for unregistered non-EAL threads

2022-11-04 Thread Morten Brørup
This patch adds statistics for unregistered non-EAL threads, which was previously not included in the statistics. Add one more entry to the stats array, and use the last index for unregistered non-EAL threads. The unregistered non-EAL thread statistics are incremented atomically. In theory, the

Re: [dpdk-dev] [PATCH v6 06/10] eal: register non-EAL threads as lcores

2022-11-03 Thread Thomas Monjalon
(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. > > > > Introduce a new API to register non-EAL thread and associate the

RE: [dpdk-dev] [PATCH v6 06/10] eal: register non-EAL threads as lcores

2022-11-03 Thread Morten Brørup
t; want to avoid such limitations by hacking RTE_PER_LCORE(_lcore_id) and > faking EAL threads potentially unknown of some DPDK component. > > 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

Re: EAL threads

2022-09-30 Thread Mattias Rönnblom
On 2022-09-21 11:05, Bruce Richardson wrote: On Wed, Sep 21, 2022 at 10:39:15AM +0200, Mattias Rönnblom wrote: I have some lcore-related questions: The documentation make use of the term "non-EAL thread". Is a non-EAL thread the same thing as a non-lcore thread? I.e., are there E

RE: EAL threads

2022-09-21 Thread Morten Brørup
"non-EAL thread". Is a non-EAL > thread > > the same thing as a non-lcore thread? I.e., are there EAL threads > that are > > not lcore threads? > > Yes, there are some threads created by EAL which are not lcore threads. > These are generally for background tasks,

Re: EAL threads

2022-09-21 Thread Bruce Richardson
On Wed, Sep 21, 2022 at 10:39:15AM +0200, Mattias Rönnblom wrote: > I have some lcore-related questions: > > The documentation make use of the term "non-EAL thread". Is a non-EAL thread > the same thing as a non-lcore thread? I.e., are there EAL threads that are > not l

EAL threads

2022-09-21 Thread Mattias Rönnblom
I have some lcore-related questions: The documentation make use of the term "non-EAL thread". Is a non-EAL thread the same thing as a non-lcore thread? I.e., are there EAL threads that are not lcore threads? I also have a question related to rte_register_thread(): sho

Re: [dpdk-dev] [PATCH 1/3] Add EAL threads API

2021-03-18 Thread Tyler Retzlaff
On Thu, Mar 18, 2021 at 02:48:01PM +, Tal Shnaiderman wrote: > > I don't know if this table is needed, the approach should be to have the > return value/rte_errno identical between the OSs. > And having the specific OS errno printed. the underlying problem here is that dpdk is adopting linux

Re: [dpdk-dev] [PATCH 1/3] Add EAL threads API

2021-03-18 Thread Narcisa Ana Maria Vasile
On Thu, Mar 18, 2021 at 02:48:01PM +, Tal Shnaiderman wrote: > > Subject: [dpdk-dev] [PATCH 1/3] Add EAL threads API > > > > From: Narcisa Vasile > > > > EAL must hide the environment specifics from apps and libraries. > > Add an EAL API for managing thre

Re: [dpdk-dev] [PATCH 1/3] Add EAL threads API

2021-03-18 Thread Narcisa Ana Maria Vasile
On Thu, Mar 18, 2021 at 04:48:49PM +0100, David Marchand wrote: > On Thu, Mar 18, 2021 at 2:01 AM Narcisa Ana Maria Vasile > wrote: > > diff --git a/lib/librte_eal/common/eal_common_thread.c > > b/lib/librte_eal/common/eal_common_thread.c > > index 73a055902..5219e783e 100644 > > --- a/lib/librte

Re: [dpdk-dev] [PATCH 1/3] Add EAL threads API

2021-03-18 Thread David Marchand
On Thu, Mar 18, 2021 at 2:01 AM Narcisa Ana Maria Vasile wrote: > diff --git a/lib/librte_eal/common/eal_common_thread.c > b/lib/librte_eal/common/eal_common_thread.c > index 73a055902..5219e783e 100644 > --- a/lib/librte_eal/common/eal_common_thread.c > +++ b/lib/librte_eal/common/eal_common_thr

Re: [dpdk-dev] [PATCH 1/3] Add EAL threads API

2021-03-18 Thread Tal Shnaiderman
> Subject: [dpdk-dev] [PATCH 1/3] Add EAL threads API > > From: Narcisa Vasile > > EAL must hide the environment specifics from apps and libraries. > Add an EAL API for managing threads. > > Signed-off-by: Narcisa Vasile > Signed-off-by: Dmitry Malloy > --- Hi

[dpdk-dev] [PATCH 1/3] Add EAL threads API

2021-03-17 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile EAL must hide the environment specifics from apps and libraries. Add an EAL API for managing threads. Signed-off-by: Narcisa Vasile Signed-off-by: Dmitry Malloy --- lib/librte_eal/common/eal_common_thread.c | 6 +- lib/librte_eal/common/rte_thread.c| 346

Re: [dpdk-dev] [PATCH v6 00/10] Register non-EAL threads as lcore

2020-07-08 Thread David Marchand
On Mon, Jul 6, 2020 at 10:53 PM David Marchand wrote: > > OVS and some other applications have been hacking into DPDK internals to > fake EAL threads and avoid performance penalty of only having non-EAL > threads. > > This series proposes to add a new type of lcores and maps

Re: [dpdk-dev] [PATCH v6 00/10] Register non-EAL threads as lcore

2020-07-08 Thread David Marchand
On Tue, Jul 7, 2020 at 1:23 AM Ananyev, Konstantin wrote: > > OVS and some other applications have been hacking into DPDK internals to > > fake EAL threads and avoid performance penalty of only having non-EAL > > threads. > > > > This series proposes to add a new

Re: [dpdk-dev] [PATCH v6 00/10] Register non-EAL threads as lcore

2020-07-06 Thread Ananyev, Konstantin
Hi David, > OVS and some other applications have been hacking into DPDK internals to > fake EAL threads and avoid performance penalty of only having non-EAL > threads. > > This series proposes to add a new type of lcores and maps those threads > to such lcores. > non-EAL

[dpdk-dev] [PATCH v6 00/10] Register non-EAL threads as lcore

2020-07-06 Thread David Marchand
OVS and some other applications have been hacking into DPDK internals to fake EAL threads and avoid performance penalty of only having non-EAL threads. This series proposes to add a new type of lcores and maps those threads to such lcores. non-EAL threads won't run the DPDK eal mainloop.

[dpdk-dev] [PATCH v6 06/10] eal: register non-EAL threads as lcores

2020-07-06 Thread David Marchand
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

[dpdk-dev] [PATCH v5 06/10] eal: register non-EAL threads as lcores

2020-07-06 Thread David Marchand
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

[dpdk-dev] [PATCH v5 00/10] Register non-EAL threads as lcore

2020-07-06 Thread David Marchand
OVS and some other applications have been hacking into DPDK internals to fake EAL threads and avoid performance penalty of only having non-EAL threads. This series proposes to add a new type of lcores and maps those threads to such lcores. non-EAL threads won't run the DPDK eal mainloop.

Re: [dpdk-dev] [PATCH v3 6/9] eal: register non-EAL threads as lcores

2020-07-04 Thread Ananyev, Konstantin
> > On Fri, Jul 3, 2020 at 6:40 PM Ananyev, Konstantin > wrote: > > what are the advantages of current approach (forbid MP support on the fly) > > over explicit start-up parameters (either --proc-type=single or > > --lcore-allow=...)? > > Why do you think it is a better one? > > I don't want t

Re: [dpdk-dev] [PATCH v3 6/9] eal: register non-EAL threads as lcores

2020-07-04 Thread David Marchand
On Fri, Jul 3, 2020 at 6:40 PM Ananyev, Konstantin wrote: > what are the advantages of current approach (forbid MP support on the fly) > over explicit start-up parameters (either --proc-type=single or > --lcore-allow=...)? > Why do you think it is a better one? I don't want to perpetuate the "pl

Re: [dpdk-dev] [PATCH v3 6/9] eal: register non-EAL threads as lcores

2020-07-03 Thread Ananyev, Konstantin
> > > If the final users finally hit the situation you describe, it means > > > that the multiprocess had been in use so far and was known to be in > > > use (*hopefully*). > > > > Yes. > > > > > So is it not a problem of design/non-regression testing when > > > integrating the new API in the fir

Re: [dpdk-dev] [PATCH v3 6/9] eal: register non-EAL threads as lcores

2020-07-03 Thread Thomas Monjalon
02/07/2020 15:06, David Marchand: > On Wed, Jul 1, 2020 at 1:58 PM Ananyev, Konstantin > wrote: > > > If the final users finally hit the situation you describe, it means > > > that the multiprocess had been in use so far and was known to be in > > > use (*hopefully*). > > > > Yes. > > > > > So is

Re: [dpdk-dev] [PATCH v3 6/9] eal: register non-EAL threads as lcores

2020-07-02 Thread David Marchand
On Wed, Jul 1, 2020 at 1:58 PM Ananyev, Konstantin wrote: > > If the final users finally hit the situation you describe, it means > > that the multiprocess had been in use so far and was known to be in > > use (*hopefully*). > > Yes. > > > So is it not a problem of design/non-regression testing wh

Re: [dpdk-dev] [PATCH v3 6/9] eal: register non-EAL threads as lcores

2020-07-01 Thread Ananyev, Konstantin
> > On Tue, Jun 30, 2020 at 8:57 PM Ananyev, Konstantin > wrote: > > Imagine the situation - there is a primary proc (supposed to run forever) > > that does rte_thread_register/rte_thread_unregister during its lifetime. > > Plus from time to time user runs some secondary process to collect > >

Re: [dpdk-dev] [PATCH v4 6/9] eal: register non-EAL threads as lcores

2020-07-01 Thread Olivier Matz
t; > > 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. > > > &g

Re: [dpdk-dev] [PATCH v3 6/9] eal: register non-EAL threads as lcores

2020-07-01 Thread David Marchand
On Tue, Jun 30, 2020 at 8:57 PM Ananyev, Konstantin wrote: > Imagine the situation - there is a primary proc (supposed to run forever) > that does rte_thread_register/rte_thread_unregister during its lifetime. > Plus from time to time user runs some secondary process to collect stats/debug > the

Re: [dpdk-dev] [PATCH v4 6/9] eal: register non-EAL threads as lcores

2020-07-01 Thread David Marchand
ead 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. > > > > Introduce a new API to register non-EAL thread and associate them to a > > free lcore with a new

Re: [dpdk-dev] [PATCH v3 6/9] eal: register non-EAL threads as lcores

2020-06-30 Thread Ananyev, Konstantin
> > On Tue, Jun 30, 2020 at 12:07:32PM +, Ananyev, Konstantin wrote: > > > > > > 26/06/2020 16:43, David Marchand: > > > > On Wed, Jun 24, 2020 at 1:59 PM Ananyev, Konstantin > > > > wrote: > > > > > > > Do you mean - make this new dynamic-lcore API return an error if > > > > > > > callied >

Re: [dpdk-dev] [PATCH v3 6/9] eal: register non-EAL threads as lcores

2020-06-30 Thread Ananyev, Konstantin
> 30/06/2020 14:07, Ananyev, Konstantin: > > > 26/06/2020 16:43, David Marchand: > > > > On Wed, Jun 24, 2020 at 1:59 PM Ananyev, Konstantin > > > > wrote: > > > > > > > Do you mean - make this new dynamic-lcore API return an error if > > > > > > > callied > > > > > > > from secondary process

Re: [dpdk-dev] [PATCH v3 6/9] eal: register non-EAL threads as lcores

2020-06-30 Thread Thomas Monjalon
data > > and if so - split lcore_id space properly among them > > (same as he has to do now with static lcores). > > A variant (more simple) of your approach could be to add > "--proc-type=standalone" to explicitly disable MP and enable dynamic thread > registr

Re: [dpdk-dev] [PATCH v3 6/9] eal: register non-EAL threads as lcores

2020-06-30 Thread Thomas Monjalon
30/06/2020 14:07, Ananyev, Konstantin: > > 26/06/2020 16:43, David Marchand: > > > On Wed, Jun 24, 2020 at 1:59 PM Ananyev, Konstantin > > > wrote: > > > > > > Do you mean - make this new dynamic-lcore API return an error if > > > > > > callied > > > > > > from secondary process? > > > > > > > >

Re: [dpdk-dev] [PATCH v3 6/9] eal: register non-EAL threads as lcores

2020-06-30 Thread Olivier Matz
On Tue, Jun 30, 2020 at 12:07:32PM +, Ananyev, Konstantin wrote: > > > > 26/06/2020 16:43, David Marchand: > > > On Wed, Jun 24, 2020 at 1:59 PM Ananyev, Konstantin > > > wrote: > > > > > > Do you mean - make this new dynamic-lcore API return an error if > > > > > > callied > > > > > > from

Re: [dpdk-dev] [PATCH v3 6/9] eal: register non-EAL threads as lcores

2020-06-30 Thread Ananyev, Konstantin
> > 26/06/2020 16:43, David Marchand: > > On Wed, Jun 24, 2020 at 1:59 PM Ananyev, Konstantin > > wrote: > > > > > Do you mean - make this new dynamic-lcore API return an error if > > > > > callied > > > > > from secondary process? > > > > > > > > Yes, and prohibiting from attaching a secondary

Re: [dpdk-dev] [PATCH v3 6/9] eal: register non-EAL threads as lcores

2020-06-30 Thread Thomas Monjalon
26/06/2020 16:43, David Marchand: > On Wed, Jun 24, 2020 at 1:59 PM Ananyev, Konstantin > wrote: > > > > Do you mean - make this new dynamic-lcore API return an error if callied > > > > from secondary process? > > > > > > Yes, and prohibiting from attaching a secondary process if dynamic > > > lco

Re: [dpdk-dev] [PATCH v4 6/9] eal: register non-EAL threads as lcores

2020-06-30 Thread Olivier Matz
TE_PER_LCORE(_lcore_id) and > faking EAL threads potentially unknown of some DPDK component. > > 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 u

Re: [dpdk-dev] [PATCH v4 6/9] eal: register non-EAL threads as lcores

2020-06-29 Thread Ananyev, Konstantin
> } > if (rte_eal_config_reattach() < 0) > return -1; > + if (!eal_mcfg_enable_multiprocess()) { > + RTE_LOG(ERR, EAL, "Primary process refused secondary > attachment\n");

[dpdk-dev] [PATCH v4 6/9] eal: register non-EAL threads as lcores

2020-06-26 Thread David Marchand
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

[dpdk-dev] [PATCH v4 0/9] Register non-EAL threads as lcore

2020-06-26 Thread David Marchand
OVS and some other applications have been hacking into DPDK internals to fake EAL threads and avoid performance penalty of only having non-EAL threads. This series proposes to add a new type of lcores and maps those threads to such lcores. non-EAL threads won't run the DPDK eal mainloop.

Re: [dpdk-dev] [PATCH v3 6/9] eal: register non-EAL threads as lcores

2020-06-26 Thread David Marchand
On Wed, Jun 24, 2020 at 1:59 PM Ananyev, Konstantin wrote: > > > Do you mean - make this new dynamic-lcore API return an error if callied > > > from secondary process? > > > > > > > Yes, and prohibiting from attaching a secondary process if dynamic > > lcore API has been used in primary. > > I int

Re: [dpdk-dev] [PATCH v3 6/9] eal: register non-EAL threads as lcores

2020-06-24 Thread Ananyev, Konstantin
> > On Wed, Jun 24, 2020 at 12:40 PM Ananyev, Konstantin > wrote: > > > Supporting lcore allocation in MP requires exchanges between > > > primary/secondary processes like what we have for memory allocations. > > > It will be quite a beast to get to work fine, while not even knowing > > > if peo

Re: [dpdk-dev] [PATCH v3 6/9] eal: register non-EAL threads as lcores

2020-06-24 Thread David Marchand
On Wed, Jun 24, 2020 at 12:40 PM Ananyev, Konstantin wrote: > > Supporting lcore allocation in MP requires exchanges between > > primary/secondary processes like what we have for memory allocations. > > It will be quite a beast to get to work fine, while not even knowing > > if people actually wan

Re: [dpdk-dev] [PATCH v3 6/9] eal: register non-EAL threads as lcores

2020-06-24 Thread Ananyev, Konstantin
> > 24/06/2020 11:56, Bruce Richardson: > > On Wed, Jun 24, 2020 at 11:23:55AM +0200, David Marchand wrote: > > > On Tue, Jun 23, 2020 at 3:16 PM Ananyev, Konstantin > > > wrote: > > > > > Even before this series, MP has no protection on lcore placing between > > > > > primary and secondary proce

Re: [dpdk-dev] [PATCH v3 6/9] eal: register non-EAL threads as lcores

2020-06-24 Thread Ananyev, Konstantin
n > ; Mcnamara, John > ; Kovacevic, Marko ; > Burakov, Anatoly ; Olivier > Matz ; Andrew Rybchenko ; > Neil Horman > Subject: Re: [dpdk-dev] [PATCH v3 6/9] eal: register non-EAL threads as lcores > > On Tue, Jun 23, 2020 at 3:16 PM Ananyev, Konstantin > wrote: > &

Re: [dpdk-dev] [PATCH v3 6/9] eal: register non-EAL threads as lcores

2020-06-24 Thread Thomas Monjalon
24/06/2020 11:56, Bruce Richardson: > On Wed, Jun 24, 2020 at 11:23:55AM +0200, David Marchand wrote: > > On Tue, Jun 23, 2020 at 3:16 PM Ananyev, Konstantin > > wrote: > > > > Even before this series, MP has no protection on lcore placing between > > > > primary and secondary processes. > > > > >

Re: [dpdk-dev] [PATCH v3 6/9] eal: register non-EAL threads as lcores

2020-06-24 Thread Bruce Richardson
On Wed, Jun 24, 2020 at 11:23:55AM +0200, David Marchand wrote: > On Tue, Jun 23, 2020 at 3:16 PM Ananyev, Konstantin > wrote: > > > Even before this series, MP has no protection on lcore placing between > > > primary and secondary processes. > > > > Agree, it is not a new problem, it has been the

Re: [dpdk-dev] [PATCH v3 6/9] eal: register non-EAL threads as lcores

2020-06-24 Thread David Marchand
On Tue, Jun 23, 2020 at 3:16 PM Ananyev, Konstantin wrote: > > Even before this series, MP has no protection on lcore placing between > > primary and secondary processes. > > Agree, it is not a new problem, it has been there for a while. > Though making lcore assignment dynamic will make it more n

Re: [dpdk-dev] [PATCH v3 6/9] eal: register non-EAL threads as lcores

2020-06-23 Thread Andrew Rybchenko
On 6/22/20 4:25 PM, David Marchand wrote: > 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

Re: [dpdk-dev] [PATCH v3 6/9] eal: register non-EAL threads as lcores

2020-06-23 Thread Ananyev, Konstantin
Hi David, > > > diff --git a/lib/librte_eal/common/eal_common_lcore.c > > > b/lib/librte_eal/common/eal_common_lcore.c > > > index 86d32a3dd7..7db05428e7 100644 > > > --- a/lib/librte_eal/common/eal_common_lcore.c > > > +++ b/lib/librte_eal/common/eal_common_lcore.c > > > @@ -220,3 +221,38 @@ rte

Re: [dpdk-dev] [PATCH v3 6/9] eal: register non-EAL threads as lcores

2020-06-23 Thread David Marchand
On Tue, Jun 23, 2020 at 11:14 AM Bruce Richardson wrote: > > On Tue, Jun 23, 2020 at 09:49:18AM +0200, David Marchand wrote: > > Hello Konstantin, > > > > On Mon, Jun 22, 2020 at 5:49 PM Ananyev, Konstantin > > wrote: > > > > diff --git a/lib/librte_eal/common/eal_common_lcore.c > > > > b/lib/li

Re: [dpdk-dev] [PATCH v3 6/9] eal: register non-EAL threads as lcores

2020-06-23 Thread Bruce Richardson
On Tue, Jun 23, 2020 at 09:49:18AM +0200, David Marchand wrote: > Hello Konstantin, > > On Mon, Jun 22, 2020 at 5:49 PM Ananyev, Konstantin > wrote: > > > diff --git a/lib/librte_eal/common/eal_common_lcore.c > > > b/lib/librte_eal/common/eal_common_lcore.c > > > index 86d32a3dd7..7db05428e7 100

Re: [dpdk-dev] [PATCH v3 6/9] eal: register non-EAL threads as lcores

2020-06-23 Thread David Marchand
Hello Konstantin, On Mon, Jun 22, 2020 at 5:49 PM Ananyev, Konstantin wrote: > > diff --git a/lib/librte_eal/common/eal_common_lcore.c > > b/lib/librte_eal/common/eal_common_lcore.c > > index 86d32a3dd7..7db05428e7 100644 > > --- a/lib/librte_eal/common/eal_common_lcore.c > > +++ b/lib/librte_ea

Re: [dpdk-dev] [PATCH v3 6/9] eal: register non-EAL threads as lcores

2020-06-22 Thread Ananyev, Konstantin
> > Hi David, > > > diff --git a/lib/librte_eal/common/eal_common_lcore.c > > b/lib/librte_eal/common/eal_common_lcore.c > > index 86d32a3dd7..7db05428e7 100644 > > --- a/lib/librte_eal/common/eal_common_lcore.c > > +++ b/lib/librte_eal/common/eal_common_lcore.c > > @@ -6,12 +6,13 @@ > > #inc

Re: [dpdk-dev] [PATCH v3 6/9] eal: register non-EAL threads as lcores

2020-06-22 Thread Ananyev, Konstantin
644 > --- a/lib/librte_eal/rte_eal_version.map > +++ b/lib/librte_eal/rte_eal_version.map > @@ -396,6 +396,8 @@ EXPERIMENTAL { > > # added in 20.08 > __rte_trace_mem_per_thread_free; > + rte_thread_register; > + rte_thread_unregister; > }; > >

[dpdk-dev] [PATCH v3 6/9] eal: register non-EAL threads as lcores

2020-06-22 Thread David Marchand
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

[dpdk-dev] [PATCH v3 0/9] Register non-EAL threads as lcore

2020-06-22 Thread David Marchand
OVS and some other applications have been hacking into DPDK internals to fake EAL threads and avoid performance penalty of only having non-EAL threads. This series proposes to add a new type of lcores and maps those threads to such lcores. non-EAL threads won't run the DPDK eal mainloop.

[dpdk-dev] [PATCH v2 6/9] eal: register non-EAL threads as lcores

2020-06-19 Thread David Marchand
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

[dpdk-dev] [PATCH v2 0/9] Register non-EAL threads as lcore

2020-06-19 Thread David Marchand
OVS and some other applications have been hacking into DPDK internals to fake EAL threads and avoid performance penalty of only having non-EAL threads. This series proposes to add a new type of lcores and maps those threads to such lcores. non-EAL threads won't run the DPDK eal mainloop.

Re: [dpdk-dev] [PATCH 5/7] eal: register non-EAL threads as lcore

2020-06-14 Thread Kinsella, Ray
and > faking EAL threads potentially unknown of some DPDK component. > > Introduce a new API to register non-EAL thread and associate them to a > free lcore with a new EXTERNAL role. > This role denotes lcores that do not run DPDK mainloop and as such > prevents use of rte_eal_wait_lc

[dpdk-dev] [PATCH 5/7] eal: register non-EAL threads as lcore

2020-06-10 Thread David Marchand
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

[dpdk-dev] [PATCH v4 2/3] timer: handle timers installed from non-EAL threads

2017-09-19 Thread Erik Gabriel Carrillo
From: Erik Carrillo This commit adds support for timers being created from non-EAL threads; it maps timers from all such threads to lcore id RTE_MAX_LCORE, and puts them all in a corresponding skiplist. Signed-off-by: Erik Gabriel Carrillo --- v3: * Rebased patch on reworked parent commit v2

[dpdk-dev] [PATCH v3 2/3] timer: handle timers installed from non-EAL threads

2017-09-13 Thread Erik Gabriel Carrillo
This commit adds support for timers being created from non-EAL threads; it maps timers from all such threads to lcore id RTE_MAX_LCORE, and puts them all in a corresponding skiplist. Signed-off-by: Erik Gabriel Carrillo --- V3: * Rebased patch on reworked parent commit v2: * Address checkpatch

[dpdk-dev] [PATCH v2 2/3] timer: handle timers installed from non-EAL threads

2017-08-25 Thread Gabriel Carrillo
This commit adds support for timers being created from non-EAL threads; it maps timers from all such threads to lcore id RTE_MAX_LCORE, and puts them all in a corresponding skiplist. Signed-off-by: Gabriel Carrillo --- v2: * Address checkpatch warnings lib/librte_timer/rte_timer.c | 48

[dpdk-dev] [PATCH 2/3] timer: handle timers installed from non-EAL threads

2017-08-23 Thread Gabriel Carrillo
This commit adds support for timers being created from non-EAL threads; it maps timers from all such threads to lcore id RTE_MAX_LCORE, and puts them all in a corresponding skiplist. Signed-off-by: Gabriel Carrillo --- lib/librte_timer/rte_timer.c | 48

[dpdk-dev] Using rte_ring_mp_xyz() across EAL and non-EAL threads ?

2015-07-06 Thread Bruce Richardson
nts for rte_rings, just for mempools. Yes, > > you > > need a NUMA node ID when creating the ring, so that DPDK knows where to > > allocate > > the memory for it. However, once that is done, the ring can safely be used > > from > > both EAL and non-EAL threads. Th

[dpdk-dev] Using rte_ring_mp_xyz() across EAL and non-EAL threads ?

2015-07-03 Thread Gopakumar Choorakkot Edakkunni
ecific elements for rte_rings, just for mempools. Yes, you > need a NUMA node ID when creating the ring, so that DPDK knows where to > allocate > the memory for it. However, once that is done, the ring can safely be used > from > both EAL and non-EAL threads. There is no requirement to

[dpdk-dev] Using rte_ring_mp_xyz() across EAL and non-EAL threads ?

2015-07-02 Thread Bruce Richardson
will work. > > Rgds, > Gopa. There are no core-specific elements for rte_rings, just for mempools. Yes, you need a NUMA node ID when creating the ring, so that DPDK knows where to allocate the memory for it. However, once that is done, the ring can safely be used from both EAL and non-EAL th

[dpdk-dev] Using rte_ring_mp_xyz() across EAL and non-EAL threads ?

2015-07-01 Thread Gopakumar Choorakkot Edakkunni
rte_ring_create() needs a socket-id though and seems to be allocating core-specific memory pools for the ring ? But my non-EAL app thread is not bound to any core, so now I am wondering if that will work. Rgds, Gopa. On Wed, Jul 1, 2015 at 10:46 AM, Gopakumar Choorakkot Edakkunni wrote: > Hi, >

[dpdk-dev] Using rte_ring_mp_xyz() across EAL and non-EAL threads ?

2015-07-01 Thread Gopakumar Choorakkot Edakkunni
Hi, I have a requirement where one of my non-EAL app threads needs to handoff some packets to an EAL task. I was thinking of using rte_ring_mp_enqueue/dequeue for that purpose. I looked at the code for the rte_ring library and it doesnt look like it has any "EAL" dependencies, but I wanted to doub