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 A22E8457C0; Wed, 14 Aug 2024 12:52:37 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7EB2142E5B; Wed, 14 Aug 2024 12:50:57 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by mails.dpdk.org (Postfix) with ESMTP id 9976E42E5A for ; Wed, 14 Aug 2024 12:50:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1723632654; x=1755168654; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=D5HglSYmmiS+oUwwoQIHKX5BPiTtkVErKa5HeMrdEk8=; b=m8qqW7K7VCAacZg5sHkhlQH3h8aFJov9UU/ksIlS6aC0LJY9oG29QTnn v/BMY1CKGzvk8IVSuzc4NYxTEg3LHDQu7/vV+YV2U7bkvdFF8x4weBU1J tLvCPr+hyxiB8bSWe6TO5u8xeEGXlBzmtofLUe3OwAVd1E8bTUoOY6FrI DhmcfSemz3Jci7GSEKNUn2u5AQxjY6AJ67elsiiCN6GvM5a9OidbIdkCc xuD8XwEcLo6OaTSWsgl6AzcXWNLwcsY0nnvmP4DVr358g/hZcOqSu97Ti cDYGBpUXGd2HsHxONDfMCnZjfELfra9e3hkdeOeULH3OroAyeHVfFkMQH A==; X-CSE-ConnectionGUID: +Nvi13sATyer/TI5yvIOvA== X-CSE-MsgGUID: 8AOOZbRvTO+8axs6Ut15rA== X-IronPort-AV: E=McAfee;i="6700,10204,11163"; a="44360420" X-IronPort-AV: E=Sophos;i="6.09,145,1716274800"; d="scan'208";a="44360420" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Aug 2024 03:50:53 -0700 X-CSE-ConnectionGUID: rnMqr2UYTVaazL2+sNsEgA== X-CSE-MsgGUID: L4xtMUqiSwKpfRlXLSWfpA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,145,1716274800"; d="scan'208";a="96481808" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.25]) by orviesa001.jf.intel.com with ESMTP; 14 Aug 2024 03:50:52 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: ferruh.yigit@amd.com, thomas@monjalon.net, mb@smartsharesystems.com, Bruce Richardson Subject: [PATCH v3 25/26] config: make queues per port a meson config option Date: Wed, 14 Aug 2024 11:49:31 +0100 Message-ID: <20240814104933.14062-26-bruce.richardson@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240814104933.14062-1-bruce.richardson@intel.com> References: <20240812132910.162252-1-bruce.richardson@intel.com> <20240814104933.14062-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 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 Acked-by: Morten Brørup --- 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: -- 2.43.0