From patchwork Wed Oct 12 12:40:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Theil X-Patchwork-Id: 118071 X-Patchwork-Delegate: thomas@monjalon.net 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 4A8D8A00C4; Wed, 12 Oct 2022 14:40:32 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DD7C243053; Wed, 12 Oct 2022 14:40:31 +0200 (CEST) Received: from smail.rz.tu-ilmenau.de (smail.rz.tu-ilmenau.de [141.24.186.67]) by mails.dpdk.org (Postfix) with ESMTP id BB8654303E for ; Wed, 12 Oct 2022 14:40:30 +0200 (CEST) Received: from localhost.localdomain (dialin-ip-23-165.ilmenau.net [80.88.23.165]) by smail.rz.tu-ilmenau.de (Postfix) with ESMTPA id 5EE43580097; Wed, 12 Oct 2022 14:40:30 +0200 (CEST) From: Markus Theil To: dev@dpdk.org Cc: Bruce Richardson , Markus Theil Subject: [PATCH] build: make headroom and max memzones configurable Date: Wed, 12 Oct 2022 14:40:21 +0200 Message-Id: <20221012124021.52265-1-markus.theil@tu-ilmenau.de> X-Mailer: git-send-email 2.38.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 We often set headroom and memzones to a different value in our builds. This should also be useful in other projects. Signed-off-by: Markus Theil --- config/meson.build | 2 ++ config/rte_config.h | 2 -- meson_options.txt | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/config/meson.build b/config/meson.build index 610e1f9ea7..8708b45c5c 100644 --- a/config/meson.build +++ b/config/meson.build @@ -299,6 +299,8 @@ endforeach dpdk_conf.set('RTE_MAX_ETHPORTS', get_option('max_ethports')) dpdk_conf.set('RTE_LIBEAL_USE_HPET', get_option('use_hpet')) dpdk_conf.set('RTE_ENABLE_TRACE_FP', get_option('enable_trace_fp')) +dpdk_conf.set('RTE_PKTMBUF_HEADROOM', get_option('pktmbuf_headroom')) +dpdk_conf.set('RTE_MAX_MEMZONE', get_option('max_memzones')) # values which have defaults which may be overridden dpdk_conf.set('RTE_MAX_VFIO_GROUPS', 64) dpdk_conf.set('RTE_DRIVER_MEMPOOL_BUCKET_SIZE_KB', 64) diff --git a/config/rte_config.h b/config/rte_config.h index b2377a04e5..235bbd860a 100644 --- a/config/rte_config.h +++ b/config/rte_config.h @@ -34,7 +34,6 @@ #define RTE_MAX_MEM_MB_PER_LIST 32768 #define RTE_MAX_MEMSEG_PER_TYPE 32768 #define RTE_MAX_MEM_MB_PER_TYPE 65536 -#define RTE_MAX_MEMZONE 2560 #define RTE_MAX_TAILQ 32 #define RTE_LOG_DP_LEVEL RTE_LOG_INFO #define RTE_BACKTRACE 1 @@ -50,7 +49,6 @@ /* mbuf defines */ #define RTE_MBUF_DEFAULT_MEMPOOL_OPS "ring_mp_mc" -#define RTE_PKTMBUF_HEADROOM 128 /* ether defines */ #define RTE_MAX_QUEUES_PER_PORT 1024 diff --git a/meson_options.txt b/meson_options.txt index 541cb3c7b4..0574dd0fff 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -50,3 +50,7 @@ option('tests', type: 'boolean', value: false, description: 'build unit tests') option('use_hpet', type: 'boolean', value: false, description: 'use HPET timer in EAL') +option('pktmbuf_headroom', type: 'integer', value: 128, description: + 'Set mbuf headroom to a custom value') +option('max_memzones', type: 'integer', value: 2560, description: + 'Set maximum allowed number of memzones')