From patchwork Thu Dec 16 11:14:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 105158 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DEEF6A00C3; Thu, 16 Dec 2021 12:15:01 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B3CCE40696; Thu, 16 Dec 2021 12:15:01 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 3C5CF40143 for ; Thu, 16 Dec 2021 12:15:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1639653300; x=1671189300; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=MJFLwNGDna9js03LayJvgsgQMe64bXCoEkmsGDBxnGo=; b=cqIE7WjAFGvFdqauBPYDnyu6m2RKvo19u1pBYy8ffXRk0lfXNNmlj6w9 OO8m92VF6U/Xwduj32/hNo4VaO6WzUWvz5mOPOV/OMXXiBGRu8v+ahH/r nU+KHXFPg1P3850Ez714u4izEFUqzFJOKEiliE3O/RGvdTix9eiBCfD1s EFspInsZdaYW3LPWMf5W+E9kY6tF7h6UrE/TGQX+Bj996A/3QU+Q0FDge mAaPLvhXWiup78zKcB4QF1WBq4ExVcUYk2kE4w8aK433G3zFQZrX5dsDO RxO2aBstjn+GqX2ktZO+Odjxpp5Ov52mdmmiyNdH2tlT2fviLKrj1zuHA g==; X-IronPort-AV: E=McAfee;i="6200,9189,10199"; a="238203538" X-IronPort-AV: E=Sophos;i="5.88,211,1635231600"; d="scan'208";a="238203538" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Dec 2021 03:14:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,211,1635231600"; d="scan'208";a="519207074" Received: from silpixa00399126.ir.intel.com ([10.237.223.86]) by orsmga008.jf.intel.com with ESMTP; 16 Dec 2021 03:14:57 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: david.marchand@redhat.com, junx.dong@intel.com, Bruce Richardson Subject: [PATCH] config: remove explicit undef of unset values Date: Thu, 16 Dec 2021 11:14:30 +0000 Message-Id: <20211216111430.699717-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 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 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 Acked-by: Morten Brørup Acked-by: Tyler Retzlaff Acked-by: Morten Brørup Acked-by: Tyler Retzlaff --- 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/ --- 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_ */