From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7DBCFA0543; Mon, 13 Jun 2022 14:37:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5E9C040150; Mon, 13 Jun 2022 14:37:24 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 26ECD400EF for ; Mon, 13 Jun 2022 14:37:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655123843; x=1686659843; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=J1A2S4ZMe/KD/fXbfikeSmzrmiUppvsPZECy5OrDKBU=; b=bnvlSHEmuZCHK64s2tmsWKdAkt4YFeZLanYVQJCzUpxcW+Qz7K8cEC5t kVIZb/JZ4SWVVE8yY+umjR8mvJdnFeCU+XDBNV7l6pIPoBvNGu6yX0Y46 2ZrutD3ycxlE4w8EYWJE1MXPtPOzwTa+8QyzliqUWMbJcqWOaL50BTxhq xKiHabN3hdIhwUQdo27U6+FR4vQiv+vdcbh+6Mklqmyf5xag0wwfuiMq1 TVWkyGeTm/krjS2rxhOOYXjqVzAZM5cp6H/Ot/x9/Lb0lQyr4x8C38k4P DxPJI1TxAEvTS0wt/i7q2HTi9ToSh+ATY2x1lF43xQ90dSjyCkVPZ+l4N w==; X-IronPort-AV: E=McAfee;i="6400,9594,10376"; a="342240713" X-IronPort-AV: E=Sophos;i="5.91,297,1647327600"; d="scan'208";a="342240713" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jun 2022 05:37:22 -0700 X-IronPort-AV: E=Sophos;i="5.91,297,1647327600"; d="scan'208";a="587771423" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.9.155]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 13 Jun 2022 05:37:20 -0700 Date: Mon, 13 Jun 2022 13:37:17 +0100 From: Bruce Richardson To: David Marchand Cc: dev , "Dong, JunX" , Morten =?iso-8859-1?Q?Br=F8rup?= , Thomas Monjalon Subject: Re: [PATCH] config: remove explicit undef of unset values Message-ID: References: <20211216111430.699717-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Mon, Jun 13, 2022 at 02:26:14PM +0200, David Marchand wrote: > On Mon, Jun 13, 2022 at 11:54 AM Bruce Richardson > wrote: > > On Thu, Dec 16, 2021 at 11:14:30AM +0000, Bruce Richardson wrote: > > > Rather than explicitly clearing any setting of undefined values in our > > > rte_config.h file, it's better to instead just add a comment that the > > > value is not set. Using a comment allows the user to set the value using > > > CFLAGS or similar mechanism without the config file clearing the value > > > again. > > > > > > The text used " is not set" is modelled after the kernel approach > > > of doing the same thing. > > > > > > Signed-off-by: Bruce Richardson > > > --- > > > > > > Although DPDK coding convention forbids use of "//" for comments, using > > > regular C comment style makes the config settings less clear, as they can > > > be confused with regular comments in the file. Using "//" makes them stand > > > out better, so I prefer it. However, if others feel strongly, they can be > > > changed to standard. > > > > > > Note: this is a resubmission of patch [1] which was part of a rejected > > > series. However, the reasons for rejection - values in config being out > > > of sync with those used for building apps - are less relevant for > > > many, if not all, of these setting, so I believe the benefits for > > > testing outweigh the potential downsides. If any setting is likely > > > problematic, I can keep the explicit undef for that case in a new patch > > > version. > > > > > > [1] http://patches.dpdk.org/project/dpdk/patch/20200903144942.671870-2-bruce.richardson@intel.com/ > > > --- > > > > Ping for review or feedback for this patch. I'd like to see it move forward > > into a DPDK release if possible. > > I'd like a check like (below), to avoid new additions: > > diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh > index 34a2e43845..8dae47165e 100755 > --- a/devtools/checkpatches.sh > +++ b/devtools/checkpatches.sh > @@ -158,6 +158,14 @@ check_forbidden_additions() { # > -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \ > "$1" || res=1 > > + # '// XXX is not set' must be preferred over '#undef XXX' > + awk -v FOLDERS='config/rte_config.h' \ > + -v EXPRESSIONS='#undef' \ > + -v RET_ON_FAIL=1 \ > + -v MESSAGE='Using "#undef XXX", prefer "// XXX is not set"' \ > + -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \ > + "$1" || res=1 > + > return $res > } > > Otherwise, the change lgtm. > Good idea. Do you want me to add your check above as a patch to this to make a two-patch set for v2? /Bruce