[dpdk-dev] [PATCH v2 1/3] spinlock: add support for HTM lock elision for x86

Bruce Richardson bruce.richardson at intel.com
Thu Jun 18 12:00:18 CEST 2015


On Wed, Jun 17, 2015 at 11:29:49PM +0200, Thomas Monjalon wrote:
> 2015-06-16 10:16, Roman Dementiev:
> > --- a/lib/librte_eal/common/include/arch/x86/rte_spinlock.h
> > +++ b/lib/librte_eal/common/include/arch/x86/rte_spinlock.h
> > @@ -39,6 +39,13 @@ extern "C" {
> >  #endif
> >  
> >  #include "generic/rte_spinlock.h"
> > +#include "rte_rtm.h"
> > +#include "rte_cpuflags.h"
> > +#include "rte_branch_prediction.h"
> > +#include <rte_common.h>
> 
> Why using angle brackets for rte_common.h?
> 
> Introducing rte_cpuflags.h in this header breaks the compilation of
> the mlx4 pmd with CONFIG_RTE_LIBRTE_MLX4_DEBUG=y.
> Indeed, it triggers the -pedantic flag which is not supported by rte_cpuflags.h.
> Maybe it's time to fix this header?

Do all our headers need to support the pedantic C flag? I don't believe this
was a previous requirement for header files. The mlx4 driver appears to be the
only place in the dpdk.org codebase where the flag actually appears - and even
then the flag disabled in mlx.c where the dpdk headers are actually included.

  73 /* DPDK headers don't like -pedantic. */$
  74 #ifdef PEDANTIC$
  75 #pragma GCC diagnostic ignored "-pedantic"$
  76 #endif$
  77 #include <rte_config.h>$
	.....


I'm just not convinced that rte_cpuflags needs to be fixed at all here.

/Bruce


More information about the dev mailing list