From patchwork Wed Aug 14 10:49:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 1238 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 698C6457C0; Wed, 14 Aug 2024 12:50:00 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 54F32402A5; Wed, 14 Aug 2024 12:50:00 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by mails.dpdk.org (Postfix) with ESMTP id 6792140274 for ; Wed, 14 Aug 2024 12:49:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1723632599; x=1755168599; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=8gT4jiUI6M5gRdOtvaH4+dIRWVDwGsukRdN4o2mnxkc=; b=KbvK2pe1BKIsSAfPFk8pS9S8JL2zDnncnEhTcELiF1rCr0OkFY8KcX0M S3hD84KW9WDr1nJC3JPjMsb80mJxEkGGqQI5vxNmgYMOW/dUf9N0kKpe3 g+f5zptMpeIZlkXxXNeu4cmTc7yPviq/bIspV0jSYtwknOZzlikC+v0nE 7RTSYy5Ter31X388xUJYXfumhGWKFt+Y1guM6Dxu7yGcRtFooZ0hwKKJ5 9hLGkDb4Xwcx2vxerdZa7BrJuZdDpmP2rBhDd/PuhrOyGuEPO8qD8INQ0 jkkBPiKkC33rFUJNtMHKWn0Stt28xa4aTH2GE5QAOQA/LZ96kgAGXTdRZ A==; X-CSE-ConnectionGUID: /GJz1sKdRrqO329jTn9lTQ== X-CSE-MsgGUID: p2T54ylNSMu0bcIXNbmhSQ== X-IronPort-AV: E=McAfee;i="6700,10204,11163"; a="44360213" X-IronPort-AV: E=Sophos;i="6.09,145,1716274800"; d="scan'208";a="44360213" 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:49:58 -0700 X-CSE-ConnectionGUID: xvHOhXzOT7SXd1LlDL+5Fg== X-CSE-MsgGUID: ++vxG1JFTuS+11f9IhM/4A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,145,1716274800"; d="scan'208";a="96481543" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.25]) by orviesa001.jf.intel.com with ESMTP; 14 Aug 2024 03:49:57 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: ferruh.yigit@amd.com, thomas@monjalon.net, mb@smartsharesystems.com, Bruce Richardson Subject: [PATCH v3 00/26] add meson config options for queues per port Date: Wed, 14 Aug 2024 11:49:06 +0100 Message-ID: <20240814104933.14062-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240812132910.162252-1-bruce.richardson@intel.com> References: <20240812132910.162252-1-bruce.richardson@intel.com> 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 There are a number of issues with the current RTE_MAX_QUEUES_PER_PORT setting in DPDK that are addressed by this patchset: * The name does not make it clear that this is intended as an ethdev-only setting * A number of other libraries are using this define rather than having more relevant defines for the particular usecase. * The define is hard-coded in DPDK source code and is not adjustable via a build-time/meson option * Because of the lack of configurability, the max is therefore set to a conservatively-high value, wasting memory. * There is an assumption that the number of Rx queues and Tx queues should have the same maximum value. Depending on application, it may be desirable to have fan-in with multiple Rx queues e.g. for classification/filtering, feed a single Tx queue, or the opposite where, e.g. for QoS Tx scheduling, a few Rx queues feeds a very large number of Tx queues. This patchset therefore addresses these by: * replacing the single define for max queues with independent defines for Rx and Tx queues. * adjusts the name to ensure that it is clear the defines are for ethports only. [ethports being used in the RTE_MAX_ETHPORTS setting]. * replaces occurances of RTE_MAX_QUEUES_PER_PORT with appropriate defines for non-ethdev use cases * replaces all other internal occurances of the define with the new per-Rx and per-Tx definitions. * adds meson config options to allow build-time configuration of the max Rx and Tx queue values. Naming Note: * The new meson config options are called "max_ethport_rx_queues" and "max_ethport_tx_queues" so that in the meson options list they appear alphabetically beside the existing "max_ethports" option. * For naming consistency, the new C defines are therefore RTE_MAX_ETHPORT_RX_QUEUES and RTE_MAX_ETHPORT_TX_QUEUES. V3: * Resend of v2 with correct author email, to avoid reply bounces * drop "rfc" prefix from patches V2: * What was a single patch with "3 insertions(+), 1 deletion(-)" has now become a 26-patch set! :-) * Created separate Rx and Tx defines * Ensured that the name makes it clear that the define is for ethdev * When updating internal use, created one patch per component for easier maintainer review. In most cases it was obvious whether Rx or Tx define should be used, but a few cases were less clear. * Added documentation updates for the changes (release notes and deprecation notice), spread across 3 of the patches. Bruce Richardson (26): cryptodev: remove use of ethdev max queues definition eventdev: remove use of ethev queues define app/test-bbdev: remove use of ethdev queue count value config: add separate defines for max Rx and Tx queues ethdev: use separate Rx and Tx queue limits bpf: use separate Rx and Tx queue limits latencystats: use separate Rx and Tx queue limits pdump: use separate Rx and Tx queue limits power: use separate Rx and Tx queue limits net/af_xdp: use separate Rx and Tx queue limits net/cnxk: use separate Rx and Tx queue limits net/failsafe: use separate Rx and Tx queue limits net/hns3: use separate Rx and Tx queue limits net/mlx5: use separate Rx and Tx queue limits net/null: use separate Rx and Tx queue limits net/sfc: use separate Rx and Tx queue limits net/thunderx: use separate Rx and Tx queue limits net/vhost: use separate Rx and Tx queue limits app/dumpcap: use separate Rx and Tx queue limits app/test-pmd: use separate Rx and Tx queue limits examples/ipsec-secgw: use separate Rx and Tx queue limits examples/l3fwd-power: use separate Rx and Tx queue limits examples/l3fwd: use separate Rx and Tx queue limits examples/vhost: use separate Rx and Tx queue limits config: make queues per port a meson config option config: add computed max queues define for compatibility app/dumpcap/main.c | 2 +- app/test-bbdev/test_bbdev.c | 4 ++-- app/test-pmd/testpmd.c | 7 ++++--- app/test-pmd/testpmd.h | 16 ++++++++-------- config/meson.build | 10 ++++++++++ config/rte_config.h | 2 +- doc/guides/rel_notes/deprecation.rst | 11 +++++++++++ doc/guides/rel_notes/release_24_11.rst | 21 +++++++++++++++++++++ drivers/net/af_xdp/rte_eth_af_xdp.c | 2 +- drivers/net/cnxk/cnxk_ethdev_ops.c | 4 ++-- drivers/net/failsafe/failsafe_ops.c | 4 ++-- drivers/net/hns3/hns3_tm.c | 2 +- drivers/net/mlx5/mlx5_flow.c | 2 +- drivers/net/mlx5/mlx5_flow_hw.c | 2 +- drivers/net/null/rte_eth_null.c | 4 ++-- drivers/net/sfc/sfc_sw_stats.c | 6 ++++-- drivers/net/thunderx/nicvf_ethdev.c | 2 +- drivers/net/vhost/rte_eth_vhost.c | 7 ++++--- examples/ipsec-secgw/ipsec-secgw.c | 2 +- examples/ipsec-secgw/ipsec.c | 2 +- examples/l3fwd-power/main.c | 2 +- examples/l3fwd-power/perf_core.c | 2 +- examples/l3fwd/main.c | 2 +- examples/vhost/main.c | 2 +- examples/vhost/main.h | 2 +- lib/bpf/bpf_pkt.c | 3 ++- lib/cryptodev/cryptodev_pmd.c | 4 ++-- lib/ethdev/ethdev_driver.h | 8 ++++---- lib/ethdev/ethdev_private.c | 24 ++++++++++++++---------- lib/ethdev/rte_ethdev.c | 16 +++++++--------- lib/ethdev/rte_ethdev.h | 18 +++++++++--------- lib/eventdev/eventdev_private.c | 2 +- lib/latencystats/rte_latencystats.c | 4 ++-- lib/pdump/rte_pdump.c | 18 +++++++++--------- lib/power/rte_power_pmd_mgmt.c | 4 ++-- meson_options.txt | 4 ++++ 36 files changed, 140 insertions(+), 87 deletions(-) --- 2.43.0