Re: [PATCH v12 6/7] eal: add unit tests for atomic bit access functions

2024-10-11 Thread David Marchand
On Fri, Oct 11, 2024 at 5:16 PM Morten Brørup wrote: > > > > The Coverity report [1] just gave me an idea: > > > > > > worker_lcore_id = rte_get_next_lcore(-1, 1, 0); > > > + TEST_ASSERT(worker_lcore_id < RTE_MAX_LCORE, "Worker thread > > allocation failed"); > > > > > > Or even better: > > > Imp

RE: [PATCH v12 6/7] eal: add unit tests for atomic bit access functions

2024-10-11 Thread Morten Brørup
> > The Coverity report [1] just gave me an idea: > > > > worker_lcore_id = rte_get_next_lcore(-1, 1, 0); > > + TEST_ASSERT(worker_lcore_id < RTE_MAX_LCORE, "Worker thread > allocation failed"); > > > > Or even better: > > Improve rte_eal_remote_launch() by checking the validity of the > worker_id

Re: [PATCH v12 6/7] eal: add unit tests for atomic bit access functions

2024-10-11 Thread David Marchand
On Fri, Oct 11, 2024 at 5:06 PM Morten Brørup wrote: > > > From: David Marchand [mailto:david.march...@redhat.com] > > Sent: Thursday, 10 October 2024 12.45 > > > > On Fri, Sep 20, 2024 at 12:57 PM Mattias Rönnblom > > wrote: > > > + static int > > \ > > > + run_parallel_test_and_mod

RE: [PATCH v12 6/7] eal: add unit tests for atomic bit access functions

2024-10-11 Thread Morten Brørup
> From: David Marchand [mailto:david.march...@redhat.com] > Sent: Thursday, 10 October 2024 12.45 > > On Fri, Sep 20, 2024 at 12:57 PM Mattias Rönnblom > wrote: > > + static int > \ > > + run_parallel_test_and_modify ## size(void *arg) \ > > + { > \ > > + s

Re: [PATCH v12 6/7] eal: add unit tests for atomic bit access functions

2024-10-11 Thread David Marchand
On Thu, Oct 10, 2024 at 1:56 PM Mattias Rönnblom wrote: > > On 2024-10-10 12:45, David Marchand wrote: > > On Fri, Sep 20, 2024 at 12:57 PM Mattias Rönnblom > > wrote: > >> + static int \ > >> + run_parallel_test_and_modify ## size(

Re: [PATCH v12 6/7] eal: add unit tests for atomic bit access functions

2024-10-10 Thread Thomas Monjalon
10/10/2024 14:35, Mattias Rönnblom: > On 2024-10-10 14:14, David Marchand wrote: > > On Thu, Oct 10, 2024 at 1:56 PM Mattias Rönnblom > > wrote: > Your argument above makes sense, but I also find the kernel style more > visually appealing. > > > > > In the end, I was left with cases like: > >

Re: [PATCH v12 6/7] eal: add unit tests for atomic bit access functions

2024-10-10 Thread Mattias Rönnblom
On 2024-10-10 14:14, David Marchand wrote: On Thu, Oct 10, 2024 at 1:56 PM Mattias Rönnblom wrote: OK. Nothing obvious from what I can see in the code. Unrelated: why did you remove all empty lines in the "template" macros? Makes them much harder to read. Those macros are hard to read. Eve

Re: [PATCH v12 6/7] eal: add unit tests for atomic bit access functions

2024-10-10 Thread David Marchand
On Thu, Oct 10, 2024 at 1:56 PM Mattias Rönnblom wrote: > OK. Nothing obvious from what I can see in the code. Unrelated: why did > you remove all empty lines in the "template" macros? Makes them much > harder to read. Those macros are hard to read. There was an extra indent that resulted in spl

Re: [PATCH v12 6/7] eal: add unit tests for atomic bit access functions

2024-10-10 Thread Mattias Rönnblom
On 2024-10-10 12:45, David Marchand wrote: On Fri, Sep 20, 2024 at 12:57 PM Mattias Rönnblom wrote: + static int \ + run_parallel_test_and_modify ## size(void *arg) \ + {

Re: [PATCH v12 6/7] eal: add unit tests for atomic bit access functions

2024-10-10 Thread David Marchand
On Fri, Sep 20, 2024 at 12:57 PM Mattias Rönnblom wrote: > + static int \ > + run_parallel_test_and_modify ## size(void *arg) \ > + { \ > + str