Re: [PATCH] eal/linux: redefine the name for rte_fbarray_init()

2024-11-14 Thread Stephen Hemminger
On Fri, 15 Nov 2024 10:26:00 +0800 Zhou congjie wrote: > On Thu, 14 Nov 2024, Stephen Hemminger wrote: > > > Date: Fri, 15 Nov 2024 01:06:27 > > From: Stephen Hemminger > > To: zcjie0802 > > Cc: dev , anatoly.burakov > > Subject: Re: [PATCH] eal/linux: re

Re: [PATCH] eal/linux: redefine the name for rte_fbarray_init()

2024-11-14 Thread Zhou congjie
On Thu, 14 Nov 2024, Stephen Hemminger wrote: > Date: Fri, 15 Nov 2024 01:06:27 > From: Stephen Hemminger > To: zcjie0802 > Cc: dev , anatoly.burakov > Subject: Re: [PATCH] eal/linux: redefine the name for rte_fbarray_init() > > What about using thread

Re: [PATCH] eal/linux: redefine the name for rte_fbarray_init()

2024-11-14 Thread Zhou congjie
On Thu, 14 Nov 2024, Stephen Hemminger wrote: > > In general DPDK uses tsc instead of monotonic time, since it is faster and > platform > independent (ie Windows). > > Why not use use a global counter instead? > I have tried tsc, but it only works on x86 and does not function on other archi

Re: [PATCH] eal/linux: redefine the name for rte_fbarray_init()

2024-11-14 Thread Zhou congjie
On Thu, 14 Nov 2024, Stephen Hemminger wrote: > > In general DPDK uses tsc instead of monotonic time, since it is faster and > platform > independent (ie Windows). > > Why not use use a global counter instead? > I have tried tsc, but it only works on x86 and does not function on other archs.

Re: [PATCH] eal/linux: redefine the name for rte_fbarray_init()

2024-11-14 Thread Stephen Hemminger
What about using thread id instead? From d1687ffbf865ba0b2d64c35acd602ca43329691e Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Thu, 14 Nov 2024 08:48:54 -0800 Subject: [PATCH] eal: fix fbarray name with multiple secondary processes When multiple secondary processes run in different con

Re: [PATCH] eal/linux: redefine the name for rte_fbarray_init()

2024-11-14 Thread Stephen Hemminger
On Thu, 14 Nov 2024 16:37:10 +0800 Congjie Zhou wrote: > > +static uint64_t > +current_time(void) > +{ > + struct timespec ts; > + if (clock_gettime(CLOCK_MONOTONIC_RAW, &ts) == -1) { > + EAL_LOG(ERR, "Fail to get current time"); > + return -1ULL; > + } > +

[PATCH] eal/linux: redefine the name for rte_fbarray_init()

2024-11-14 Thread Congjie Zhou
add the current time into the name Signed-off-by: Congjie Zhou --- When multiple secondary processes run in different containers, names identified by PIDs are not unique due to the pid namespace. Add current time to redefine a unique name. lib/eal/linux/eal_memalloc.c | 17 +++-- 1

[PATCH] eal/linux: redefine the name for rte_fbarray_init()

2024-11-14 Thread Congjie Zhou
add the current time into the name Signed-off-by: Congjie Zhou --- When multiple secondary processes run in different containers, names identified by PIDs are not unique due to the pid namespace. Add current time to redefine a unique name. lib/eal/linux/eal_memalloc.c | 16 ++-- 1