[dpdk-dev] [RFC 1/5] eal: add the APIs to wait until equal

Gavin Hu (Arm Technology China) Gavin.Hu at arm.com
Tue Jul 2 16:07:50 CEST 2019


Hi Thomas,
> -----Original Message-----
> From: Thomas Monjalon <thomas at monjalon.net>
> Sent: Monday, July 1, 2019 3:43 PM
> To: Gavin Hu (Arm Technology China) <Gavin.Hu at arm.com>
> Cc: Stephen Hemminger <stephen at networkplumber.org>; dev at dpdk.org;
> jerinj at marvell.com; hemant.agrawal at nxp.com;
> bruce.richardson at intel.com; chaozhu at linux.vnet.ibm.com; Honnappa
> Nagarahalli <Honnappa.Nagarahalli at arm.com>; nd <nd at arm.com>;
> gaetan.rivet at 6wind.com
> Subject: Re: [dpdk-dev] [RFC 1/5] eal: add the APIs to wait until equal
> 
> 01/07/2019 09:16, Gavin Hu (Arm Technology China):
> > From: Stephen Hemminger <stephen at networkplumber.org>
> > > Gavin Hu <gavin.hu at arm.com> wrote:
> > >
> > > > +#ifdef RTE_USE_WFE
> > > > +#define rte_wait_until_equal_relaxed(addr, expected) do {\
> [...]
> > > That is a hot mess.
> > > Macro's are harder to maintain and offer no benefit over inline functions.
> >
> > During our internal review, I ever used C11 _Generic to generalize the API
> to take different types of arguments.
> 
> Gavin, the question is about macros versus functions.
> Please, could you convert it into an inline function?
Sure, I will do it in next version.



More information about the dev mailing list