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 727E0457A1; Mon, 12 Aug 2024 15:29:28 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5F5F140664; Mon, 12 Aug 2024 15:29:28 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by mails.dpdk.org (Postfix) with ESMTP id 77D0C402C3 for ; Mon, 12 Aug 2024 15:29:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1723469366; x=1755005366; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=KU1bN2yXYQngTJqu1aXHl4FARw4D81iJxsxg7LVyuHw=; b=kphF2nT7aKkVtSlnw3VambfA8LP1cpOEjoo0dO0Fi9U6RQPrGD2h1JwE CksvP+AS78QcLhXXPFgJzcaRcpWn5aB6jDpMiDfMvOA5LNqkaHhC3tY/H mpzkzM3P60/qnVEkJRxHGUkE31lvs2Uov8XQqBWOmAKCEs/Jt7Wq7fRyS yIBkXtDRCNLH3BrKI/urTaby3mVL9kL+/FNlK+vgilY+7jed4cJqUmOVY VzIyXqpNbTwpodX/S3gGCYXPWAvZx2B7pw0qK8mtDN1AkvZd80oHydMGo 86IdsZOwlaF6r5nIyLl6lMNKQdBnXztMgQCWFQW/OjFzGGV2/DX+XGEr2 w==; X-CSE-ConnectionGUID: cS51T4oLQNKno506Ec1x3Q== X-CSE-MsgGUID: FdtLupY0SOq0piuPlTxqjw== X-IronPort-AV: E=McAfee;i="6700,10204,11162"; a="21143985" X-IronPort-AV: E=Sophos;i="6.09,283,1716274800"; d="scan'208";a="21143985" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2024 06:29:25 -0700 X-CSE-ConnectionGUID: QZFvTgGxSw60Z05C8gWUlg== X-CSE-MsgGUID: b8/IK0pVRTWigEBQ5r/RvQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,283,1716274800"; d="scan'208";a="57923161" Received: from silpixa00400562.ir.intel.com (HELO silpixa00401385.ir.intel.com) ([10.237.214.39]) by fmviesa006.fm.intel.com with ESMTP; 12 Aug 2024 06:29:24 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: ferruh.yigit@amd.com, thomas@monjalon.net, Bruce Richardson Subject: [RFC PATCH] config: make queues per port a meson config option Date: Mon, 12 Aug 2024 14:29:10 +0100 Message-ID: <20240812132910.162252-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 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 --- config/meson.build | 1 + config/rte_config.h | 1 - meson_options.txt | 2 ++ 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config/meson.build b/config/meson.build index 8c8b019c25..e9e40ce874 100644 --- a/config/meson.build +++ b/config/meson.build @@ -352,6 +352,7 @@ endforeach # set other values pulled from the build options dpdk_conf.set('RTE_MAX_ETHPORTS', get_option('max_ethports')) +dpdk_conf.set('RTE_MAX_QUEUES_PER_PORT', get_option('max_queues_per_ethport')) 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 dd7bb0d35b..eec1932d0f 100644 --- a/config/rte_config.h +++ b/config/rte_config.h @@ -64,7 +64,6 @@ #define RTE_MBUF_DEFAULT_MEMPOOL_OPS "ring_mp_mc" /* ether defines */ -#define RTE_MAX_QUEUES_PER_PORT 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/meson_options.txt b/meson_options.txt index e49b2fc089..e5e94dc4bf 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -44,6 +44,8 @@ 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: 'Set the highest NUMA node supported by EAL; "default" is different per-arch, "detect" detects the highest NUMA node on the build machine.') +option('max_queues_per_ethport', type: 'integer', value: 256, description: + 'maximum number of queues on an Ethernet device') option('enable_iova_as_pa', type: 'boolean', value: true, description: 'Support the use of physical addresses for IO addresses, such as used by UIO or VFIO in no-IOMMU mode. When disabled, DPDK can only run with IOMMU support for address mappings, but will have more space available in the mbuf structure.') option('mbuf_refcnt_atomic', type: 'boolean', value: true, description: -- 2.43.0