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 0343EA0543; Mon, 13 Jun 2022 11:54:40 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EAC5E40150; Mon, 13 Jun 2022 11:54:39 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id B441B400EF for ; Mon, 13 Jun 2022 11:54:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655114078; x=1686650078; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=4lmaaU4gDP0V7yFHBLWk8QoO6x/J5uYhLNNIz3x1ruw=; b=IkXAuY0O16mmdj1GeV+funOcZ2VrtkcGwy0hq60F5CvAEV3DgU0tGgkV MRfhI6Q4prLE5HisDWAiOUykXhWhlw3xYtPnky5nTqhPZJ+5KFornDZUl aE2moIO+h3Cda/zF4FjmB4eHcZhZHvp8pAPziz7118TbqMk6kgfDX3dgg XOMbdUnN+8rr81ZdBn+kFxQnqM1oi7TmCPIaG3oNiCuhZSZndBHObRufH eia5gOi+6QdgkoMDX0ev2UPj4Jo1pv60x0XmoivTxVgNJ3v+8FygMj93g CBuEJev5Uxn23jFutyumCK94hah5pu5LUA+qQOjQB/UKzTkjMUEUIhB/z g==; X-IronPort-AV: E=McAfee;i="6400,9594,10376"; a="342206140" X-IronPort-AV: E=Sophos;i="5.91,297,1647327600"; d="scan'208";a="342206140" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jun 2022 02:54:37 -0700 X-IronPort-AV: E=Sophos;i="5.91,297,1647327600"; d="scan'208";a="829721567" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.9.155]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 13 Jun 2022 02:54:36 -0700 Date: Mon, 13 Jun 2022 10:54:33 +0100 From: Bruce Richardson To: dev@dpdk.org Cc: david.marchand@redhat.com, junx.dong@intel.com 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: <20211216111430.699717-1-bruce.richardson@intel.com> 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 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. /Bruce > config/rte_config.h | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/config/rte_config.h b/config/rte_config.h > index cab4390a97..953216babd 100644 > --- a/config/rte_config.h > +++ b/config/rte_config.h > @@ -83,17 +83,17 @@ > > /* ip_fragmentation defines */ > #define RTE_LIBRTE_IP_FRAG_MAX_FRAG 8 > -#undef RTE_LIBRTE_IP_FRAG_TBL_STAT > +// RTE_LIBRTE_IP_FRAG_TBL_STAT is not set > > /* rte_power defines */ > #define RTE_MAX_LCORE_FREQS 64 > > /* rte_sched defines */ > -#undef RTE_SCHED_CMAN > -#undef RTE_SCHED_COLLECT_STATS > -#undef RTE_SCHED_SUBPORT_TC_OV > +// RTE_SCHED_CMAN is not set > +// RTE_SCHED_COLLECT_STATS is not set > +// RTE_SCHED_SUBPORT_TC_OV is not set > #define RTE_SCHED_PORT_N_GRINDERS 8 > -#undef RTE_SCHED_VECTOR > +// RTE_SCHED_VECTOR is not set > > /* KNI defines */ > #define RTE_KNI_PREEMPT_DEFAULT 1 > @@ -127,7 +127,7 @@ > > /* i40e defines */ > #define RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC 1 > -#undef RTE_LIBRTE_I40E_16BYTE_RX_DESC > +// RTE_LIBRTE_I40E_16BYTE_RX_DESC is not set > #define RTE_LIBRTE_I40E_QUEUE_NUM_PER_PF 64 > #define RTE_LIBRTE_I40E_QUEUE_NUM_PER_VF 4 > #define RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM 4 > @@ -140,6 +140,6 @@ > #define RTE_LIBRTE_QEDE_FW "" > > /* DLB2 defines */ > -#undef RTE_LIBRTE_PMD_DLB2_QUELL_STATS > +// RTE_LIBRTE_PMD_DLB2_QUELL_STATS is not set > > #endif /* _RTE_CONFIG_H_ */ > -- > 2.32.0 >