From patchwork Tue Aug 13 16:00:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 143147 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 00788457BB; Wed, 14 Aug 2024 09:51:04 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F0685427C0; Wed, 14 Aug 2024 09:49:12 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) by mails.dpdk.org (Postfix) with ESMTP id A4E5840E15 for ; Tue, 13 Aug 2024 18:00:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1723564850; x=1755100850; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=VRzHJ3f1pJTPvn6cgcKBKSYqrs8+zWaI9ZUTdhDv0QA=; b=E9mrbIHyM+JIt3kkXc51GoekOsUx0bG7Fyza2YMHJm6QTmQbhjRetpyq 6JUitMyie5uXQiBRxurEfVo3BXD4KqcVOZCcMuZcI1LSzuTUAoswlKatM vMdSA+tfKpE2ocMpFxMJxMIQLwTPuI5q1KrV5SlOrj3ofXpZZoqGzZBrS 9PVQRbhGk9EoL2I427ibtrNvcWqcs8pFrXhZZyVzzfNhBHRzGD4XDvnFL SBNnHeHLAHTwxR0l6OfaNV+fNTSB3yHu4z6o5gS67bR1z6TKEnzdyJUhX XV93LKwKXuUzEmhOywxhRHW0D7+Nntl4pu9CDs7swA6WLxe8scDoYQZG8 A==; X-CSE-ConnectionGUID: 5LiwhNGiTa6XPB7gGKK+Tg== X-CSE-MsgGUID: vneqf5tPQFG2nqQF7Bv2Hw== X-IronPort-AV: E=McAfee;i="6700,10204,11163"; a="12987902" X-IronPort-AV: E=Sophos;i="6.09,286,1716274800"; d="scan'208";a="12987902" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Aug 2024 09:00:49 -0700 X-CSE-ConnectionGUID: D9ZqVyBIQ7G5C4VZN4FVRA== X-CSE-MsgGUID: s3AhVqFDSYaL3O4YWDYLOw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,286,1716274800"; d="scan'208";a="58406716" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.25]) by fmviesa007.fm.intel.com with ESMTP; 13 Aug 2024 09:00:48 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: ferruh.yigit@amd.com, thomas@monjalon.net, mb@smartsharesystems.com, Bruce Richardson Subject: [RFC PATCH v2 25/26] config: make queues per port a meson config option Date: Tue, 13 Aug 2024 17:00:02 +0100 Message-ID: <20240813160003.423935-26-bruce.richards@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240813160003.423935-1-bruce.richards@intel.com> References: <20240812132910.162252-1-bruce.richardson@intel.com> <20240813160003.423935-1-bruce.richards@intel.com> MIME-Version: 1.0 X-Mailman-Approved-At: Wed, 14 Aug 2024 09:48:35 +0200 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 From: Bruce Richardson The default number of ethernet queues per port is currently set to 1k which is more than enough for most applications, but still is lower than the total number of queues which may be available on modern NICs. Rather than increasing the max queues further, which will increase the memory footprint (since the value is used in array dimensioning), we can instead make the value a meson tunable option - and reduce the default value to 256 in the process. This means that: * most apps which don't need hundreds of queues will see lower mem use. * apps which do need to use thousands of queues can configure DPDK to allow this, without having to modify DPDK files (i.e. rte_config.h) Signed-off-by: Bruce Richardson --- config/meson.build | 2 ++ config/rte_config.h | 3 --- doc/guides/rel_notes/release_24_11.rst | 13 +++++++++++-- meson_options.txt | 4 ++++ 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/config/meson.build b/config/meson.build index 8c8b019c25..fc41354c53 100644 --- a/config/meson.build +++ b/config/meson.build @@ -352,6 +352,8 @@ endforeach # set other values pulled from the build options dpdk_conf.set('RTE_MAX_ETHPORTS', get_option('max_ethports')) +dpdk_conf.set('RTE_MAX_ETHPORT_RX_QUEUES', get_option('max_ethport_rx_queues')) +dpdk_conf.set('RTE_MAX_ETHPORT_TX_QUEUES', get_option('max_ethport_tx_queues')) dpdk_conf.set('RTE_LIBEAL_USE_HPET', get_option('use_hpet')) dpdk_conf.set('RTE_ENABLE_STDATOMIC', get_option('enable_stdatomic')) dpdk_conf.set('RTE_ENABLE_TRACE_FP', get_option('enable_trace_fp')) diff --git a/config/rte_config.h b/config/rte_config.h index 2c11b4eeec..7450e0d648 100644 --- a/config/rte_config.h +++ b/config/rte_config.h @@ -64,9 +64,6 @@ #define RTE_MBUF_DEFAULT_MEMPOOL_OPS "ring_mp_mc" /* ether defines */ -#define RTE_MAX_QUEUES_PER_PORT 1024 -#define RTE_MAX_ETHPORT_RX_QUEUES 1024 -#define RTE_MAX_ETHPORT_TX_QUEUES 1024 #define RTE_ETHDEV_QUEUE_STAT_CNTRS 16 /* max 256 */ #define RTE_ETHDEV_RXTX_CALLBACKS 1 #define RTE_MAX_MULTI_HOST_CTRLS 4 diff --git a/doc/guides/rel_notes/release_24_11.rst b/doc/guides/rel_notes/release_24_11.rst index 3725c056ba..825cc0fad9 100644 --- a/doc/guides/rel_notes/release_24_11.rst +++ b/doc/guides/rel_notes/release_24_11.rst @@ -58,8 +58,17 @@ New Features * **New configuration settings for Rx and Tx Ethernet Queues.** New defines have been added to DPDK to allow independent tracking of the maximum number of Rx and Tx queues. - These defines as ``RTE_MAX_ETHPORT_RX_QUEUES`` and ``RTE_MAX_ETHPORT_TX_QUEUES``, - and should be used in place of the older macro ``RTE_MAX_QUEUES_PER_PORT``. + These defines are ``RTE_MAX_ETHPORT_RX_QUEUES`` and ``RTE_MAX_ETHPORT_TX_QUEUES``, + and these new defines should be used in place of the older define ``RTE_MAX_QUEUES_PER_PORT``. + Unlike the older define, these new defines are build-time configurable via meson options: + ``max_ethport_rx_queues`` and ``max_ethport_tx_queues``. + +.. note:: + + The default max values for Rx and Tx queue limits are reduced from 1024, in previous releases, + to 256 in this release. + For application that require large numbers of queues, + these defaults can be changed via the meson configuration options described above. Removed Items diff --git a/meson_options.txt b/meson_options.txt index e49b2fc089..a9a7052ba6 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -40,6 +40,10 @@ option('machine', type: 'string', value: 'auto', description: 'Alias of cpu_instruction_set.') option('max_ethports', type: 'integer', value: 32, description: 'maximum number of Ethernet devices') +option('max_ethport_rx_queues', type: 'integer', value: 256, description: + 'maximum number of Rx queues on an Ethernet device') +option('max_ethport_tx_queues', type: 'integer', value: 256, description: + 'maximum number of Tx queues on an Ethernet device') option('max_lcores', type: 'string', value: 'default', description: 'Set maximum number of cores/threads supported by EAL; "default" is different per-arch, "detect" detects the number of cores on the build machine.') option('max_numa_nodes', type: 'string', value: 'default', description: