Thread (167 messages) 167 messages, 11 authors, 2020-01-17

Re: [dpdk-dev] [PATCH v7 2/7] eal: add the APIs to wait until equal

From: David Marchand <hidden>
Date: 2019-10-21 19:17:40

On Mon, Oct 21, 2019 at 9:39 AM Gavin Hu (Arm Technology China)
[off-list ref] wrote:
quoted
-----Original Message-----
From: David Marchand <redacted>
- This is a new api, should be marked experimental, even if inlined.
It is ok to add for the patches except the rte_ring, which called the API in the .h file, other than the .c file.
For the .h file is included by a lot of components, which require adding 'allowing_experimenal_apis = true' to the meson.build and makefile.
I am worried adding too many of these changes is confusing. I may leave this patch out of the series if there is no decorous solutions.
You can still keep the current code in the ring headers under a
#ifndef ALLOW_EXPERIMENTAL_API banner and put the call to your new
experimental api in the #else part of it.
Something like:

#ifndef ALLOW_EXPERIMENTAL_API
                while (unlikely(ht->tail != old_val))
                        rte_pause();
#else
                rte_wait_until_equal_relaxed_32(&ht->tail, old_val);

#endif

This way, if the application enables the experimental api, then the
ring code will benefit from it, else it will rely on the current
stable code.

-- 
David Marchand
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help