Re: [dpdk-dev] [PATCH v6 00/10] eal: Add new API for threading

2021-04-16 Thread Narcisa Ana Maria Vasile
On Mon, Apr 12, 2021 at 09:56:14AM +0200, David Marchand wrote: > On Sat, Apr 3, 2021 at 3:39 AM Narcisa Ana Maria Vasile > wrote: > > > > From: Narcisa Vasile > > > > EAL thread API > > > Thanks for taking on this huge work. > > There is no revie

Re: [dpdk-dev] [PATCH v2] build: fix symlink of drivers for Windows

2021-04-23 Thread Narcisa Ana Maria Vasile
On Sat, Apr 10, 2021 at 09:01:43AM +0100, Nick Connolly wrote: > The symlink-drivers-solibs.sh script was disabled as part of 'install' > for Windows because there is no support for shell scripts. However, > this means that driver related DLLs are not present in the installed > 'libdir' directory.

Re: [dpdk-dev] [PATCH v6 03/10] windows/eal: translate Windows errors to errno-style errors

2021-04-29 Thread Narcisa Ana Maria Vasile
On Thu, Apr 29, 2021 at 03:50:38AM +0300, Dmitry Kozlyuk wrote: > 2021-04-02 18:39 (UTC-0700), Narcisa Ana Maria Vasile: > > From: Narcisa Vasile > > > > Add function to translate Windows error codes to > > errno-style error codes. > > > > Signed-off-by: N

Re: [dpdk-dev] [PATCH v6 01/10] eal: add thread id and simple thread functions

2021-04-29 Thread Narcisa Ana Maria Vasile
On Thu, Apr 29, 2021 at 07:28:26PM +0300, Dmitry Kozlyuk wrote: > 2021-04-29 13:05 (UTC+0100), Kinsella, Ray: > > On 29/04/2021 08:44, Thomas Monjalon wrote: > > > 29/04/2021 02:50, Dmitry Kozlyuk: > > >> 2021-04-02 18:38 (UTC-0700), Narcisa Ana Maria V

[dpdk-dev] [PATCH v10 0/9] eal: Add EAL API for threading

2021-06-18 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile EAL thread API **Problem Statement** DPDK currently uses the pthread interface to create and manage threads. Windows does not support the POSIX thread programming model, so it currently relies on a header file that hides the Windows calls under pthread matched interfaces. Gi

[dpdk-dev] [PATCH v10 2/9] eal: add thread attributes

2021-06-18 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Implement thread attributes for: * thread affinity * thread priority Implement functions for managing thread attributes. Priority is represented through an enum that allows for two levels: - RTE_THREAD_PRIORITY_NORMAL - RTE_THREAD_PRIORITY_REALTIME_CRITICAL

[dpdk-dev] [PATCH v10 5/9] eal: implement thread priority management functions

2021-06-18 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Add function for setting the priority for a thread. Priorities on multiple platforms are similarly determined by a priority value and a priority class/policy. On Linux, the following mapping is created: RTE_THREAD_PRIORITY_NORMAL corresponds to * policy SCHED_OTHER * priorit

[dpdk-dev] [PATCH v10 1/9] eal: add basic threading functions

2021-06-18 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Use a portable, type-safe representation for the thread identifier. Add functions for comparing thread ids and obtaining the thread id for the current thread. Signed-off-by: Narcisa Vasile --- lib/eal/common/meson.build| 1 + lib/eal/{unix => common}/rte_threa

[dpdk-dev] [PATCH v10 4/9] eal: implement functions for thread affinity management

2021-06-18 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Implement functions for getting/setting thread affinity. Threads can be pinned to specific cores by setting their affinity attribute. Signed-off-by: Narcisa Vasile Signed-off-by: Dmitry Malloy --- lib/eal/common/rte_thread.c | 16 lib/eal/include/rte_thread.h |

[dpdk-dev] [PATCH v10 3/9] eal/windows: translate Windows errors to errno-style errors

2021-06-18 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Add function to translate Windows error codes to errno-style error codes. The possible return values are chosen so that we have as much semantical compatibility between platforms as possible. Signed-off-by: Narcisa Vasile --- lib/eal/common/rte_thread.c | 6 +-- lib/eal/

[dpdk-dev] [PATCH v10 7/9] eal: implement functions for mutex management

2021-06-18 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Add functions for mutex init, destroy, lock, unlock. Add RTE_STATIC_MUTEX macro to replace static initialization of mutexes. Windows does not have a static initializer. Initialization is only done through InitializeCriticalSection(). The RTE_STATIC_MUTEX calls into the rte_

[dpdk-dev] [PATCH v10 6/9] eal: add thread lifetime management

2021-06-18 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Add functions for thread creation, joining, detaching. The *rte_thread_create()* function can optionally receive an rte_thread_attr_t object that will cause the thread to be created with the affinity and priority described by the attributes object. If no rte_thread_attr_t is

[dpdk-dev] [PATCH v10 8/9] eal: implement functions for thread barrier management

2021-06-18 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Add functions for barrier init, destroy, wait. A portable type is used to represent a barrier identifier. The rte_thread_barrier_wait() function returns the same value on all platforms. Signed-off-by: Narcisa Vasile --- lib/eal/common/rte_thread.c | 61 ++

[dpdk-dev] [PATCH v10 9/9] eal: add EAL argument for setting thread priority

2021-06-18 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Allow the user to choose the thread priority through an EAL command line argument. The user can choose thread priority through an EAL parameter, when starting an application. If EAL parameter is not used, the per-platform default value for thread priority is used. Otherwise

Re: [dpdk-dev] [PATCH v9 01/10] eal: add thread id and simple thread functions

2021-06-18 Thread Narcisa Ana Maria Vasile
On Wed, Jun 09, 2021 at 02:03:48AM +0300, Dmitry Kozlyuk wrote: > 2021-06-04 16:44 (UTC-0700), Narcisa Ana Maria Vasile: > > From: Narcisa Vasile > > > > Use a portable, type-safe representation for the thread identifier. > > Add functions for comparing thread ids

Re: [dpdk-dev] [PATCH v9 06/10] eal: add thread lifetime management

2021-06-18 Thread Narcisa Ana Maria Vasile
On Wed, Jun 09, 2021 at 02:04:09AM +0300, Dmitry Kozlyuk wrote: > 2021-06-04 16:44 (UTC-0700), Narcisa Ana Maria Vasile: > [...] > > diff --git a/lib/eal/include/rte_thread.h b/lib/eal/include/rte_thread.h > > index 5c54cd9d67..1d481b9ad5 100644 > > --- a/lib/eal/include/rt

Re: [dpdk-dev] [PATCH v9 04/10] eal: implement functions for thread affinity management

2021-06-18 Thread Narcisa Ana Maria Vasile
On Wed, Jun 09, 2021 at 02:03:57AM +0300, Dmitry Kozlyuk wrote: > 2021-06-04 16:44 (UTC-0700), Narcisa Ana Maria Vasile: > [...] > > diff --git a/lib/eal/windows/rte_thread.c b/lib/eal/windows/rte_thread.c > > index 6ea1dc2a05..9e74a538c2 100644 > > --- a/lib/eal/windows/rt

Re: [dpdk-dev] [PATCH v9 10/10] Enable the new EAL thread API

2021-06-18 Thread Narcisa Ana Maria Vasile
On Wed, Jun 09, 2021 at 02:08:22AM +0300, Dmitry Kozlyuk wrote: > 2021-06-07 22:50 (UTC-0700), Narcisa Ana Maria Vasile: > > On Fri, Jun 04, 2021 at 04:44:34PM -0700, Narcisa Ana Maria Vasile wrote: > > > From: Narcisa Vasile > > > > > > Rename pthread_* occur

Re: [dpdk-dev] [PATCH v9 10/10] Enable the new EAL thread API

2021-06-18 Thread Narcisa Ana Maria Vasile
On Tue, Jun 08, 2021 at 09:45:44AM +0200, David Marchand wrote: > On Tue, Jun 8, 2021 at 7:50 AM Narcisa Ana Maria Vasile > wrote: > > > > On Fri, Jun 04, 2021 at 04:44:34PM -0700, Narcisa Ana Maria Vasile wrote: > > > From: Narcisa Vasile > > > > > &

[dpdk-dev] [PATCH 0/6] Enable the internal EAL thread API

2021-06-18 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile This patchset enables the new EAL thread API. Rename pthread* with rte_thread* corresponding symbols. Set thread attributes. Add option for choosing between internal API or external lib. Depends-on: series-17402 ("eal: Add EAL API for threading") Narcisa Vasile (6): eal:

[dpdk-dev] [PATCH 1/6] eal: add function that sets thread name

2021-06-18 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Implement function that sets the name of a thread. On Windows, SetThreadDescription() is used. Use GetProcAddress() to obtain the address of the function for MinGW compatibility. Signed-off-by: Narcisa Vasile --- lib/eal/common/rte_thread.c | 17 ++ lib/eal/includ

[dpdk-dev] [PATCH 2/6] eal: add function for control thread creation

2021-06-18 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile The existing rte_ctrl_thread_create() function will be replaced with rte_thread_ctrl_thread_create() that uses the internal EAL thread API. This patch only introduces the new control thread creation function. Replacing of the old function needs to be done according to the AB

[dpdk-dev] [PATCH 4/6] lib: enable the new EAL thread API

2021-06-18 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Rename pthread* with the new rte_thread* API. Signed-off-by: Narcisa Vasile --- lib/eal/common/eal_common_options.c | 6 ++--- lib/eal/common/eal_common_thread.c | 13 + lib/eal/common/eal_common_trace.c | 1 + lib/eal/common/eal_private.h

[dpdk-dev] [PATCH 5/6] eal: set affinity and priority attributes

2021-06-18 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile If the user doesn't specify the priority through the command line arguments, initialize the thread priority to 'normal'. Set thread priority for eal threads. Signed-off-by: Narcisa Vasile --- lib/eal/common/eal_common_thread.c | 11 lib/eal/common/eal_thread.h

[dpdk-dev] [PATCH 3/6] Enable the new EAL thread API in app, drivers and examples

2021-06-18 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Rename pthread* with the new rte_thread* API. Signed-off-by: Narcisa Vasile --- app/test/process.h| 8 +-- app/test/test_lcores.c| 18 +++ app/test/test_link_bonding.c | 14 ++--- app/test/test_lpm_p

[dpdk-dev] [PATCH 6/6] Allow choice between internal EAL thread API and external lib

2021-06-18 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile The user is offered the option of either using the RTE_THREAD_* API or a 3rd party thread library, through a meson flag called "use_external_thread_lib". By default, this flag is set to FALSE, which means Windows libraries and applications will use the RTE_THREAD_* API for ma

[dpdk-dev] [PATCH v2 2/6] eal: add function for control thread creation

2021-06-18 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile The existing rte_ctrl_thread_create() function will be replaced with rte_thread_ctrl_thread_create() that uses the internal EAL thread API. This patch only introduces the new control thread creation function. Replacing of the old function needs to be done according to the AB

[dpdk-dev] [PATCH v2 1/6] eal: add function that sets thread name

2021-06-18 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Implement function that sets the name of a thread. On Windows, SetThreadDescription() is used. Use GetProcAddress() to obtain the address of the function for MinGW compatibility. Depends-on: series-17402 ("eal: Add EAL API for threading") Signed-off-by: Narcisa Vasile ---

[dpdk-dev] [PATCH v2 0/6] Enable the internal EAL thread API

2021-06-18 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile This patchset enables the new EAL thread API. The newly defined thread attributes, priority and affinity, are used in eal/windows when creating the threads. Similarly, some changes have been done in eal/linux/eal.c and eal/freebsd/eal.c to initialize priority to a default va

[dpdk-dev] [PATCH v2 4/6] lib: enable the new EAL thread API

2021-06-18 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Rename pthread* with the new rte_thread* API. Depends-on: series-17402 ("eal: Add EAL API for threading") Signed-off-by: Narcisa Vasile --- lib/eal/common/eal_common_options.c | 6 ++--- lib/eal/common/eal_common_thread.c | 13 + lib/eal/common/eal_commo

[dpdk-dev] [PATCH v2 3/6] Enable the new EAL thread API in app, drivers and examples

2021-06-18 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Rename pthread* with the new rte_thread* API. Depends-on: series-17402 ("eal: Add EAL API for threading") Signed-off-by: Narcisa Vasile --- app/test/process.h| 8 +-- app/test/test_lcores.c| 18 +++ app/test/test_li

[dpdk-dev] [PATCH v2 5/6] eal: set affinity and priority attributes

2021-06-18 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile If the user doesn't specify the priority through the command line arguments, initialize the thread priority to 'normal'. Set thread priority for eal threads. Depends-on: series-17402 ("eal: Add EAL API for threading") Signed-off-by: Narcisa Vasile --- lib/eal/common/eal_c

[dpdk-dev] [PATCH v2 6/6] Allow choice between internal EAL thread API and external lib

2021-06-18 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile The user is offered the option of either using the RTE_THREAD_* API or a 3rd party thread library, through a meson flag called "use_external_thread_lib". By default, this flag is set to FALSE, which means Windows libraries and applications will use the RTE_THREAD_* API for ma

[dpdk-dev] [PATCH] eal/windows: ensure all the CPUs in the set are checked

2021-06-24 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Fix count_cpu() to ensure it iterates through all the CPUs in a set. count_cpu() iterates through the CPUs in the set 's' and counts the selected ones. Previously, it was incorrectly using the number of CPUSETS to iterate through the CPUs. Signed-off-by: Narcisa Vasile ---

[dpdk-dev] [PATCH v2] eal/windows: ensure all enabled CPUs are counted

2021-06-29 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile rte_cpuset_t describes a set of CPUs by using an array of masks named '_bits'. Each element in the '_bits' array represents a bit mask, with each bit corresponding to a CPU. The maximum number of CPUs is given by 'CPU_SETSIZE'. The number of bit masks is computed using '_NUM_

Re: [dpdk-dev] [PATCH] eal/windows: ensure all the CPUs in the set are checked

2021-06-29 Thread Narcisa Ana Maria Vasile
On Fri, Jun 25, 2021 at 11:36:21AM +0300, Dmitry Kozlyuk wrote: > 2021-06-24 17:27 (UTC-0700), Narcisa Ana Maria Vasile: > > From: Narcisa Vasile > > > > Fix count_cpu() to ensure it iterates through all the CPUs in a set. > > count_cpu() iterates through the CPUs in

Re: [dpdk-dev] [PATCH v5 03/10] windows/eal: translate Windows errors to errno-style errors

2021-04-01 Thread Narcisa Ana Maria Vasile
On Wed, Mar 31, 2021 at 01:56:09PM +, Tal Shnaiderman wrote: > > Subject: [PATCH v5 03/10] windows/eal: translate Windows errors to errno- > > style errors > > > > External email: Use caution opening links or attachments > > > > > > From: Narcisa Vasile > > > > Add function to translate Wi

[dpdk-dev] [PATCH v6 01/10] eal: add thread id and simple thread functions

2021-04-02 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Add the thread identifier type. Add functions for comparing thread ids and obtaining the thread id for the current thread. Signed-off-by: Narcisa Vasile --- lib/librte_eal/common/rte_thread.c| 101 ++ lib/librte_eal/include/rte_thread.h

[dpdk-dev] [PATCH v6 00/10] eal: Add new API for threading

2021-04-02 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile EAL thread API **Problem Statement** DPDK currently uses the pthread interface to create and manage threads. Windows does not support the POSIX thread programming model, so it currently relies on a header file that hides the Windows calls under pthread matched interfaces. Gi

[dpdk-dev] [PATCH v6 03/10] windows/eal: translate Windows errors to errno-style errors

2021-04-02 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Add function to translate Windows error codes to errno-style error codes. Signed-off-by: Narcisa Vasile --- lib/librte_eal/include/rte_thread.h | 5 +- lib/librte_eal/windows/rte_thread.c | 75 ++--- 2 files changed, 60 insertions(+), 20 deletions(

[dpdk-dev] [PATCH v6 04/10] eal: implement functions for thread affinity management

2021-04-02 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Implement functions for getting/setting thread affinity. Signed-off-by: Narcisa Vasile Signed-off-by: Dmitry Malloy --- lib/librte_eal/common/rte_thread.c | 13 ++ lib/librte_eal/include/rte_thread.h | 41 +++ lib/librte_eal/windows/eal_lcore.c | 170 ++

[dpdk-dev] [PATCH v6 02/10] eal: add thread attributes

2021-04-02 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Implement thread attributes for: * thread affinity * thread priority Implement functions for managing thread attributes. Signed-off-by: Narcisa Vasile --- lib/librte_eal/common/rte_thread.c| 53 lib/librte_eal/include/rte_thread.h | 82 +

[dpdk-dev] [PATCH v6 07/10] eal: implement functions for mutex management

2021-04-02 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Add functions for mutex init, destroy, lock, unlock. Signed-off-by: Narcisa Vasile --- lib/librte_eal/common/rte_thread.c| 24 + lib/librte_eal/include/rte_thread.h | 53 +++ lib/librte_eal/include/rte_thread_types.h | 3 +

[dpdk-dev] [PATCH v6 08/10] eal: implement functions for thread barrier management

2021-04-02 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Add functions for barrier init, destroy, wait. Signed-off-by: Narcisa Vasile --- lib/librte_eal/common/rte_thread.c| 16 +++ lib/librte_eal/include/rte_thread.h | 46 +++ lib/librte_eal/include/rte_thread_types.h | 2 + .../in

[dpdk-dev] [PATCH v6 06/10] eal: add thread lifetime management

2021-04-02 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Add function for thread creation, join, canceling. Signed-off-by: Narcisa Vasile --- lib/librte_eal/common/rte_thread.c | 110 lib/librte_eal/include/rte_thread.h | 53 lib/librte_eal/windows/rte_thread.c | 125 ++

[dpdk-dev] [PATCH v6 09/10] eal: add EAL argument for setting thread priority

2021-04-02 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Allow the user to choose the thread priority through an EAL command line argument. The user can select the thread priority to be either 'normal' or 'critical': --thread-prio normal --thread-prio realtime Signed-off-by: Narcisa Vasile --- lib/librte_eal/common/eal_common_o

[dpdk-dev] [PATCH v6 05/10] eal: implement thread priority management functions

2021-04-02 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Add function for setting the priority for a thread. Signed-off-by: Narcisa Vasile --- lib/librte_eal/common/rte_thread.c | 25 ++ lib/librte_eal/include/rte_thread.h | 17 +++ lib/librte_eal/windows/rte_thread.c | 76 + 3 files chan

Re: [PATCH] eal/windows: set pthread affinity

2022-01-25 Thread Narcisa Ana Maria Vasile
On Thu, Jan 20, 2022 at 04:17:49PM -0800, Pallavi Kadam wrote: > Sometimes OS tries to switch the core. So, bind the lcore thread > to a fixed core. > Implement affinity call on Windows similar to Linux. > > Signed-off-by: Qiao Liu > Signed-off-by: Pallavi Kadam > --- > lib/eal/windows/eal.c |

Re: [PATCH v18 8/8] eal: implement functions for mutex management

2022-02-08 Thread Narcisa Ana Maria Vasile
On Tue, Feb 08, 2022 at 02:21:49AM +, Ananyev, Konstantin wrote: > > > > > + > > > +/** > > > + * Thread mutex representation. > > > > Actually, please scrap that comment. > Obviously it wouldn't work for static variables, > and doesn't make much sense. > Though few thoughts remain: > for

Re: [PATCH v18 8/8] eal: implement functions for mutex management

2022-02-08 Thread Narcisa Ana Maria Vasile
On Mon, Feb 07, 2022 at 04:02:54PM +, Ananyev, Konstantin wrote: > > Add functions for mutex init, destroy, lock, unlock, trylock. > > > > Windows does not have a static initializer. Initialization > > is only done through InitializeCriticalSection(). To overcome this, > > RTE_INIT_MUTEX macro

Re: [dpdk-dev] [PATCH v16 0/9] eal: Add EAL API for threading

2021-11-08 Thread Narcisa Ana Maria Vasile
On Tue, Oct 12, 2021 at 06:07:06PM +0200, Thomas Monjalon wrote: > 09/10/2021 09:41, Narcisa Ana Maria Vasile: > > From: Narcisa Vasile > > > > EAL thread API > > > > **Problem Statement** > > DPDK currently uses the pthread interface to create and manag

Re: [dpdk-dev] [PATCH v16 2/9] eal: add thread attributes

2021-11-08 Thread Narcisa Ana Maria Vasile
On Tue, Oct 12, 2021 at 06:12:21PM +0200, Thomas Monjalon wrote: > 09/10/2021 09:41, Narcisa Ana Maria Vasile: > > From: Narcisa Vasile > > > > Implement thread attributes for: > > * thread affinity > > * thread priority > > Implement functions for managi

Re: [dpdk-dev] [PATCH v16 3/9] eal/windows: translate Windows errors to errno-style errors

2021-11-08 Thread Narcisa Ana Maria Vasile
On Tue, Oct 12, 2021 at 06:16:19PM +0200, Thomas Monjalon wrote: > 09/10/2021 09:41, Narcisa Ana Maria Vasile: > > From: Narcisa Vasile > > > > Add function to translate Windows error codes to > > errno-style error codes. The possible return values are chosen

Re: [dpdk-dev] [PATCH v16 7/9] eal: implement functions for mutex management

2021-11-08 Thread Narcisa Ana Maria Vasile
On Tue, Oct 12, 2021 at 06:28:56PM +0200, Thomas Monjalon wrote: > 09/10/2021 09:41, Narcisa Ana Maria Vasile: > > From: Narcisa Vasile > > > > Add functions for mutex init, destroy, lock, unlock, trylock. > > > > Add RTE_STATIC_MUTEX macro to replace sta

Re: [dpdk-dev] [PATCH v16 8/9] eal: implement functions for thread barrier management

2021-11-08 Thread Narcisa Ana Maria Vasile
On Tue, Oct 12, 2021 at 06:32:09PM +0200, Thomas Monjalon wrote: > 09/10/2021 09:41, Narcisa Ana Maria Vasile: > > From: Narcisa Vasile > > > > Add functions for barrier init, destroy, wait. > > > > A portable type is used to represent a barrier identifier

Re: [dpdk-dev] [PATCH v16 9/9] Add unit tests for thread API

2021-11-08 Thread Narcisa Ana Maria Vasile
On Tue, Oct 12, 2021 at 06:33:16PM +0200, Thomas Monjalon wrote: > 09/10/2021 09:41, Narcisa Ana Maria Vasile: > > From: Narcisa Vasile > > > > As a new API for threading is introduced, > > a set of unit tests have been added to test the new interface. > > The

[dpdk-dev] [PATCH v17 00/13] eal: Add EAL API for threading

2021-11-09 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile EAL thread API **Problem Statement** DPDK currently uses the pthread interface to create and manage threads. Windows does not support the POSIX thread programming model, so it currently relies on a header file that hides the Windows calls under pthread matched interfaces. Gi

[dpdk-dev] [PATCH v17 01/13] eal: add basic threading functions

2021-11-09 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Use a portable, type-safe representation for the thread identifier. Add functions for comparing thread ids and obtaining the thread id for the current thread. Signed-off-by: Narcisa Vasile --- lib/eal/common/meson.build| 1 + lib/eal/{unix => common}/rte_threa

[dpdk-dev] [PATCH v17 02/13] eal: add thread attributes

2021-11-09 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Implement thread attributes for: * thread affinity * thread priority Implement functions for managing thread attributes. Priority is represented through an enum that allows for two levels: - RTE_THREAD_PRIORITY_NORMAL - RTE_THREAD_PRIORITY_REALTIME_CRITICAL

[dpdk-dev] [PATCH v17 03/13] eal/windows: translate Windows errors to errno-style errors

2021-11-09 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Add function to translate Windows error codes to errno-style error codes. The possible return values are chosen so that we have as much semantical compatibility between platforms as possible. Signed-off-by: Narcisa Vasile --- lib/eal/windows/rte_thread.c | 48 +

[dpdk-dev] [PATCH v17 04/13] eal: implement functions for thread affinity management

2021-11-09 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Implement functions for getting/setting thread affinity. Threads can be pinned to specific cores by setting their affinity attribute. Signed-off-by: Narcisa Vasile Signed-off-by: Dmitry Malloy --- lib/eal/common/rte_thread.c | 16 lib/eal/include/rte_thread.h |

[dpdk-dev] [PATCH v17 09/13] app/test: add unit tests for thread lifetime management

2021-11-09 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile As a new API for threading is introduced, a set of unit tests have been added to test the new interface. Verify that threads are created and cleaned up correctly. Signed-off-by: Narcisa Vasile --- app/test/test_threads.c | 29 + 1 file changed,

[dpdk-dev] [PATCH v17 11/13] app/test: add unit tests for barrier

2021-11-09 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile As a new API for threading is introduced, a set of unit tests have been added to test the new interface. Verify that the barrier correctly synchronizes all threads. Verify that the threads are unblocked after the required number of threads have called barrier_wait(). Signed

[dpdk-dev] [PATCH v17 08/13] app/test: add unit tests for thread attributes

2021-11-09 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile As a new API for threading is introduced, a set of unit tests have been added to test the new interface. Verify that affinity and priority can be set successfully. Signed-off-by: Narcisa Vasile --- app/test/test_threads.c | 125 1

[dpdk-dev] [PATCH v17 05/13] eal: implement thread priority management functions

2021-11-09 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Add functions for setting and getting the priority of a thread. Priorities on multiple platforms are similarly determined by a priority value and a priority class/policy. Currently in DPDK most threads operate at the OS-default priority level but there are cases when increas

[dpdk-dev] [PATCH v17 07/13] app/test: add unit tests for rte_thread_self

2021-11-09 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile As a new API for threading is introduced, a set of unit tests have been added to test the new interface. Test the rte_thread_self() functionality used to retrieve the thread id. Signed-off-by: Narcisa Vasile --- app/test/meson.build| 2 ++ app/test/test_threads.c | 63

[dpdk-dev] [PATCH v17 06/13] eal: add thread lifetime management

2021-11-09 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Add functions for thread creation, joining, detaching. The *rte_thread_create()* function can optionally receive an rte_thread_attr_t object that will cause the thread to be created with the affinity and priority described by the attributes object. If no rte_thread_attr_t is

[dpdk-dev] [PATCH v17 10/13] eal: implement functions for thread barrier management

2021-11-09 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Add functions for barrier init, destroy, wait. A portable type is used to represent a barrier identifier. The rte_thread_barrier_wait() function returns the same value on all platforms. Signed-off-by: Narcisa Vasile --- lib/eal/common/rte_thread.c | 61 ++

[dpdk-dev] [PATCH v17 12/13] eal: implement functions for mutex management

2021-11-09 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Add functions for mutex init, destroy, lock, unlock, trylock. Windows does not have a static initializer. Initialization is only done through InitializeCriticalSection(). To overcome this, RTE_INIT_MUTEX macro is added to replace static initialization of mutexes. The macro c

[dpdk-dev] [PATCH v17 13/13] app/test: add unit tests for mutex

2021-11-09 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile As a new API for threading is introduced, a set of unit tests have been added to test the new interface. Verify that the mutex correctly locks/unlocks and protects the data. Check both static and dynamic mutexes. Signed-off-by: Narcisa Vasile --- app/test/test_threads.c |

Re: [dpdk-dev] [PATCH v16 2/9] eal: add thread attributes

2021-11-09 Thread Narcisa Ana Maria Vasile
On Tue, Nov 09, 2021 at 09:27:09AM +0100, Thomas Monjalon wrote: > 09/11/2021 02:59, Narcisa Ana Maria Vasile: > > On Tue, Oct 12, 2021 at 06:12:21PM +0200, Thomas Monjalon wrote: > > > 09/10/2021 09:41, Narcisa Ana Maria Vasile: > > > > From: Narcisa Vasile >

Re: [dpdk-dev] [PATCH v16 9/9] Add unit tests for thread API

2021-11-09 Thread Narcisa Ana Maria Vasile
On Tue, Nov 09, 2021 at 09:32:08AM +0100, Thomas Monjalon wrote: > 09/11/2021 03:10, Narcisa Ana Maria Vasile: > > On Tue, Oct 12, 2021 at 06:33:16PM +0200, Thomas Monjalon wrote: > > > 09/10/2021 09:41, Narcisa Ana Maria Vasile: > > > > From: Narcisa Vasile >

Re: [dpdk-dev] [PATCH v16 8/9] eal: implement functions for thread barrier management

2021-11-09 Thread Narcisa Ana Maria Vasile
On Mon, Nov 08, 2021 at 06:07:34PM -0800, Narcisa Ana Maria Vasile wrote: > On Tue, Oct 12, 2021 at 06:32:09PM +0200, Thomas Monjalon wrote: > > 09/10/2021 09:41, Narcisa Ana Maria Vasile: > > > From: Narcisa Vasile > > > > > > Add functions for barrier

Re: [dpdk-dev] [PATCH v9] eal: remove sys/queue.h from public headers

2021-09-20 Thread Narcisa Ana Maria Vasile
On Tue, Aug 24, 2021 at 04:21:03PM +, William Tu wrote: > Currently there are some public headers that include 'sys/queue.h', which > is not POSIX, but usually provided by the Linux/BSD system library. > (Not in POSIX.1, POSIX.1-2001, or POSIX.1-2008. Present on the BSDs.) > The file is missing

[dpdk-dev] [PATCH v11 00/10] eal: Add EAL API for threading

2021-07-30 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile EAL thread API **Problem Statement** DPDK currently uses the pthread interface to create and manage threads. Windows does not support the POSIX thread programming model, so it currently relies on a header file that hides the Windows calls under pthread matched interfaces. Gi

[dpdk-dev] [PATCH v11 01/10] eal: add basic threading functions

2021-07-30 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Use a portable, type-safe representation for the thread identifier. Add functions for comparing thread ids and obtaining the thread id for the current thread. Signed-off-by: Narcisa Vasile --- lib/eal/common/meson.build| 1 + lib/eal/{unix => common}/rte_threa

[dpdk-dev] [PATCH v11 02/10] eal: add thread attributes

2021-07-30 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Implement thread attributes for: * thread affinity * thread priority Implement functions for managing thread attributes. Priority is represented through an enum that allows for two levels: - RTE_THREAD_PRIORITY_NORMAL - RTE_THREAD_PRIORITY_REALTIME_CRITICAL

[dpdk-dev] [PATCH v11 03/10] eal/windows: translate Windows errors to errno-style errors

2021-07-30 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Add function to translate Windows error codes to errno-style error codes. The possible return values are chosen so that we have as much semantical compatibility between platforms as possible. Signed-off-by: Narcisa Vasile --- lib/eal/common/rte_thread.c | 6 +-- lib/eal/

[dpdk-dev] [PATCH v11 05/10] eal: implement thread priority management functions

2021-07-30 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Add function for setting the priority for a thread. Priorities on multiple platforms are similarly determined by a priority value and a priority class/policy. On Linux, the following mapping is created: RTE_THREAD_PRIORITY_NORMAL corresponds to * policy SCHED_OTHER * priorit

[dpdk-dev] [PATCH v11 04/10] eal: implement functions for thread affinity management

2021-07-30 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Implement functions for getting/setting thread affinity. Threads can be pinned to specific cores by setting their affinity attribute. Signed-off-by: Narcisa Vasile Signed-off-by: Dmitry Malloy --- lib/eal/common/rte_thread.c | 16 lib/eal/include/rte_thread.h |

[dpdk-dev] [PATCH v11 07/10] eal: implement functions for mutex management

2021-07-30 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Add functions for mutex init, destroy, lock, unlock. Add RTE_STATIC_MUTEX macro to replace static initialization of mutexes. Windows does not have a static initializer. Initialization is only done through InitializeCriticalSection(). The RTE_STATIC_MUTEX calls into the rte_

[dpdk-dev] [PATCH v11 08/10] eal: implement functions for thread barrier management

2021-07-30 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Add functions for barrier init, destroy, wait. A portable type is used to represent a barrier identifier. The rte_thread_barrier_wait() function returns the same value on all platforms. Signed-off-by: Narcisa Vasile --- lib/eal/common/rte_thread.c | 61 ++

[dpdk-dev] [PATCH v11 06/10] eal: add thread lifetime management

2021-07-30 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Add functions for thread creation, joining, detaching. The *rte_thread_create()* function can optionally receive an rte_thread_attr_t object that will cause the thread to be created with the affinity and priority described by the attributes object. If no rte_thread_attr_t is

[dpdk-dev] [PATCH v11 09/10] eal: add EAL argument for setting thread priority

2021-07-30 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Allow the user to choose the thread priority through an EAL command line argument. The user can choose thread priority through an EAL parameter, when starting an application. If EAL parameter is not used, the per-platform default value for thread priority is used. Otherwise

[dpdk-dev] [PATCH v11 10/10] Add unit tests for thread API

2021-07-30 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile As a new API for threading is introduced, a set of unit tests have been added to test the new interface. Signed-off-by: Narcisa Vasile --- app/test/meson.build| 2 + app/test/test_threads.c | 419 2 files changed, 421 insertio

[dpdk-dev] [PATCH v12 00/10] eal: Add EAL API for threading

2021-08-02 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile EAL thread API **Problem Statement** DPDK currently uses the pthread interface to create and manage threads. Windows does not support the POSIX thread programming model, so it currently relies on a header file that hides the Windows calls under pthread matched interfaces. Gi

[dpdk-dev] [PATCH v12 01/10] eal: add basic threading functions

2021-08-02 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Use a portable, type-safe representation for the thread identifier. Add functions for comparing thread ids and obtaining the thread id for the current thread. Signed-off-by: Narcisa Vasile --- lib/eal/common/meson.build| 1 + lib/eal/{unix => common}/rte_threa

[dpdk-dev] [PATCH v12 02/10] eal: add thread attributes

2021-08-02 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Implement thread attributes for: * thread affinity * thread priority Implement functions for managing thread attributes. Priority is represented through an enum that allows for two levels: - RTE_THREAD_PRIORITY_NORMAL - RTE_THREAD_PRIORITY_REALTIME_CRITICAL

[dpdk-dev] [PATCH v12 03/10] eal/windows: translate Windows errors to errno-style errors

2021-08-02 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Add function to translate Windows error codes to errno-style error codes. The possible return values are chosen so that we have as much semantical compatibility between platforms as possible. Signed-off-by: Narcisa Vasile --- lib/eal/common/rte_thread.c | 6 +-- lib/eal/

[dpdk-dev] [PATCH v12 04/10] eal: implement functions for thread affinity management

2021-08-02 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Implement functions for getting/setting thread affinity. Threads can be pinned to specific cores by setting their affinity attribute. Signed-off-by: Narcisa Vasile Signed-off-by: Dmitry Malloy --- lib/eal/common/rte_thread.c | 16 lib/eal/include/rte_thread.h |

[dpdk-dev] [PATCH v12 05/10] eal: implement thread priority management functions

2021-08-02 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Add function for setting the priority for a thread. Priorities on multiple platforms are similarly determined by a priority value and a priority class/policy. On Linux, the following mapping is created: RTE_THREAD_PRIORITY_NORMAL corresponds to * policy SCHED_OTHER * priorit

[dpdk-dev] [PATCH v12 08/10] eal: implement functions for thread barrier management

2021-08-02 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Add functions for barrier init, destroy, wait. A portable type is used to represent a barrier identifier. The rte_thread_barrier_wait() function returns the same value on all platforms. Signed-off-by: Narcisa Vasile --- lib/eal/common/rte_thread.c | 61 ++

[dpdk-dev] [PATCH v12 06/10] eal: add thread lifetime management

2021-08-02 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Add functions for thread creation, joining, detaching. The *rte_thread_create()* function can optionally receive an rte_thread_attr_t object that will cause the thread to be created with the affinity and priority described by the attributes object. If no rte_thread_attr_t is

[dpdk-dev] [PATCH v12 09/10] eal: add EAL argument for setting thread priority

2021-08-02 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Allow the user to choose the thread priority through an EAL command line argument. The user can choose thread priority through an EAL parameter, when starting an application. If EAL parameter is not used, the per-platform default value for thread priority is used. Otherwise

[dpdk-dev] [PATCH v12 07/10] eal: implement functions for mutex management

2021-08-02 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Add functions for mutex init, destroy, lock, unlock. Add RTE_STATIC_MUTEX macro to replace static initialization of mutexes. Windows does not have a static initializer. Initialization is only done through InitializeCriticalSection(). The RTE_STATIC_MUTEX calls into the rte_

[dpdk-dev] [PATCH v12 10/10] Add unit tests for thread API

2021-08-02 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile As a new API for threading is introduced, a set of unit tests have been added to test the new interface. Signed-off-by: Narcisa Vasile --- app/test/meson.build| 2 + app/test/test_threads.c | 419 2 files changed, 421 insertio

Re: [dpdk-dev] [PATCH v12 01/10] eal: add basic threading functions

2021-08-02 Thread Narcisa Ana Maria Vasile
On Mon, Aug 02, 2021 at 10:32:17AM -0700, Narcisa Ana Maria Vasile wrote: > From: Narcisa Vasile > > Use a portable, type-safe representation for the thread identifier. > Add functions for comparing thread ids and obtaining the thread id > for the current thread. > > S

[dpdk-dev] [PATCH v13 00/10] eal: Add EAL API for threading

2021-08-03 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile EAL thread API **Problem Statement** DPDK currently uses the pthread interface to create and manage threads. Windows does not support the POSIX thread programming model, so it currently relies on a header file that hides the Windows calls under pthread matched interfaces. Gi

[dpdk-dev] [PATCH v13 01/10] eal: add basic threading functions

2021-08-03 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Use a portable, type-safe representation for the thread identifier. Add functions for comparing thread ids and obtaining the thread id for the current thread. Signed-off-by: Narcisa Vasile --- lib/eal/common/meson.build| 1 + lib/eal/{unix => common}/rte_threa

[dpdk-dev] [PATCH v13 02/10] eal: add thread attributes

2021-08-03 Thread Narcisa Ana Maria Vasile
From: Narcisa Vasile Implement thread attributes for: * thread affinity * thread priority Implement functions for managing thread attributes. Priority is represented through an enum that allows for two levels: - RTE_THREAD_PRIORITY_NORMAL - RTE_THREAD_PRIORITY_REALTIME_CRITICAL

  1   2   3   4   >