From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f48.google.com (mail-wg0-f48.google.com [74.125.82.48]) by dpdk.org (Postfix) with ESMTP id 09D7EC4D0 for ; Mon, 22 Jun 2015 17:33:10 +0200 (CEST) Received: by wgqq4 with SMTP id q4so19779450wgq.1 for ; Mon, 22 Jun 2015 08:33:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-type :content-disposition:in-reply-to; bh=aurPdH/n45KzBdr45DJxCyBiiAI5UgILvnYUCVj+xew=; b=fWHXOxzuoP5wuTdNF7qTo1dI6AVmcDiZr1nanlozbJpmbQqC59cATPswtPvaf6fZKk uYYOqSAvBNEiyko+ZZIEjf1GNmNcXUhEj+x2o/Lu5POU5GHPQEDHgO7wONDUBkRq8s2H zcY7CkSh2E6qH72aCv+Le5KPu78gGpIUMXKlGigHrk7182E8eQDjjp2IC2C6CuWhtoW/ 6h3lNBGWCQooqKTZAcS+vdZWXUAYLOksIiPVJbusL/sisWZcS5PKSqXPSYiPev5m8hr2 ggbno+zwlj7YJWrhqYi08wMyXC2RwPvgrxFxuvQymvOKbzEYEJXyBDS4acsgxQKrIz4T h+lw== X-Gm-Message-State: ALoCoQnzGCUHWpwGSl5Bh4O1e85nLdlH2peM9Zkj/wHkTuzr4IbAI8teqb/Le0wf8Gb+wAizYT9Y X-Received: by 10.194.100.42 with SMTP id ev10mr50274987wjb.50.1434987189248; Mon, 22 Jun 2015 08:33:09 -0700 (PDT) Received: from 6wind.com (6wind.net2.nerim.net. [213.41.151.210]) by mx.google.com with ESMTPSA id s8sm17810096wik.5.2015.06.22.08.33.07 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 22 Jun 2015 08:33:08 -0700 (PDT) Date: Mon, 22 Jun 2015 17:32:59 +0200 From: Adrien Mazarguil To: Thomas Monjalon Message-ID: <20150622153259.GN31262@6wind.com> Mail-Followup-To: Thomas Monjalon , Bruce Richardson , Roman Dementiev , dev@dpdk.org References: <1433250693-23644-1-git-send-email-roman.dementiev@intel.com> <10408699.ljKKKDUIsH@xps13> <20150618100016.GA7972@bricha3-MOBL3> <6446943.entjzpE8eR@xps13> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6446943.entjzpE8eR@xps13> Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v2 1/3] spinlock: add support for HTM lock elision for x86 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2015 15:33:10 -0000 On Fri, Jun 19, 2015 at 03:35:38PM +0200, Thomas Monjalon wrote: > 2015-06-18 11:00, Bruce Richardson: > > On Wed, Jun 17, 2015 at 11:29:49PM +0200, Thomas Monjalon wrote: > > > 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 $ > > ..... > > You're right. It seems this disabling doesn't work. Well, it used to work, at least sufficiently until now. The mlx4 driver started as an out of tree development long ago, this flag is here from the beginning and was left around to maintain a clean code base in the PMD itself. Unfortunately, it had to include a few headers that were not quite ready to handle such constraints, hence the somewhat ugly #pragma workarounds left until these headers could be fixed someday. > > I'm just not convinced that rte_cpuflags needs to be fixed at all here. > > Yes, it's probably simpler to remove the -pedantic flag. I'm not going to argue against that, as a PMD's Makefile is obviously not the right place to add a -pedantic parameter anyway. However outside of PMD usage, I think public API headers (I'm not talking about the entire DPDK code base, just headers) should handle all kind of warnings a user application might throw at it for its own use (-pedantic and other -Wstuff, I'd even say -std=c99 for strict ISO C compliance), as is the case for the C library and most, if not all system-wide headers. -- Adrien Mazarguil 6WIND