On Mon, Oct 21, 2019 at 9:39 AM Gavin Hu (Arm Technology China) <gavin...@arm.com> wrote: > > -----Original Message----- > > From: David Marchand <david.march...@redhat.com> > > - 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