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 C08ED457BB; Wed, 14 Aug 2024 09:49:33 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8482D41140; Wed, 14 Aug 2024 09:48:48 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) by mails.dpdk.org (Postfix) with ESMTP id 4B0694026C for ; Tue, 13 Aug 2024 18:00:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1723564824; x=1755100824; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=B6YF2pdG0e2o9qqt+Vsbew5TfMsVHh5z+GVt+Vp6Oao=; b=D5t+VIdd/vO79G3SOQCpoQIg6m8lo80BOYVicnnk/0ygJy01h1bRsfYi 9pGBsCVe1e8rs3xFBidB3C67ugNctvcf0666/SiawDL+2WvKVqQC9xOnR thcz3zugHbp8liU9QkxW1M4eO0ImQ9+ad1Dnht5imRMnaHkIS9ckE9GCL YQSAYAnlnH5MUs6bW5yzXjVDQtNBG/9m+/1bz7/BlV4Zw+NJzTOqPs47z UkQxsykvEHAT1JEymPnrU8ekaBy//6cDG63pBA6nM56M9nHd3WzKYCgNT TV4/xN8TYWdYMPZnplv4n5YNG2nzYTflHOaQ3HIDPoIh3vwsYnvLszrCk A==; X-CSE-ConnectionGUID: UA5qBV7yQWqQ3Wr54CGZZA== X-CSE-MsgGUID: BQSo2pOXSfuq8qcq0qMcMg== X-IronPort-AV: E=McAfee;i="6700,10204,11163"; a="12987824" X-IronPort-AV: E=Sophos;i="6.09,286,1716274800"; d="scan'208";a="12987824" 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:23 -0700 X-CSE-ConnectionGUID: SyzkbqzoS/2IccvkdlZmuA== X-CSE-MsgGUID: sZRRhYvFQhO1tNeA0VaxuQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,286,1716274800"; d="scan'208";a="58406214" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.25]) by fmviesa007.fm.intel.com with ESMTP; 13 Aug 2024 09:00:21 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: ferruh.yigit@amd.com, thomas@monjalon.net, mb@smartsharesystems.com, Bruce Richardson , Bruce Richardson Subject: [RFC PATCH v2 08/26] pdump: use separate Rx and Tx queue limits Date: Tue, 13 Aug 2024 16:59:45 +0100 Message-ID: <20240813160003.423935-9-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 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Wed, 14 Aug 2024 09:48:34 +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 Update library to use the new defines RTE_MAX_ETHPORT_TX_QUEUES and RTE_MAX_ETHPORT_RX_QUEUES rather than the old define RTE_MAX_QUEUES_PER_PORT. Signed-off-by: Bruce Richardson --- lib/pdump/rte_pdump.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/pdump/rte_pdump.c b/lib/pdump/rte_pdump.c index 679c3dd0b5..0e0f1088f5 100644 --- a/lib/pdump/rte_pdump.c +++ b/lib/pdump/rte_pdump.c @@ -61,8 +61,8 @@ static struct pdump_rxtx_cbs { const struct rte_bpf *filter; enum pdump_version ver; uint32_t snaplen; -} rx_cbs[RTE_MAX_ETHPORTS][RTE_MAX_QUEUES_PER_PORT], -tx_cbs[RTE_MAX_ETHPORTS][RTE_MAX_QUEUES_PER_PORT]; +} rx_cbs[RTE_MAX_ETHPORTS][RTE_MAX_ETHPORT_RX_QUEUES], +tx_cbs[RTE_MAX_ETHPORTS][RTE_MAX_ETHPORT_TX_QUEUES]; /* @@ -72,8 +72,8 @@ tx_cbs[RTE_MAX_ETHPORTS][RTE_MAX_QUEUES_PER_PORT]; */ static const char MZ_RTE_PDUMP_STATS[] = "rte_pdump_stats"; static struct { - struct rte_pdump_stats rx[RTE_MAX_ETHPORTS][RTE_MAX_QUEUES_PER_PORT]; - struct rte_pdump_stats tx[RTE_MAX_ETHPORTS][RTE_MAX_QUEUES_PER_PORT]; + struct rte_pdump_stats rx[RTE_MAX_ETHPORTS][RTE_MAX_ETHPORT_RX_QUEUES]; + struct rte_pdump_stats tx[RTE_MAX_ETHPORTS][RTE_MAX_ETHPORT_TX_QUEUES]; const struct rte_memzone *mz; } *pdump_stats; @@ -708,8 +708,8 @@ rte_pdump_disable_by_deviceid(char *device_id, uint16_t queue, } static void -pdump_sum_stats(uint16_t port, uint16_t nq, - struct rte_pdump_stats stats[RTE_MAX_ETHPORTS][RTE_MAX_QUEUES_PER_PORT], +pdump_sum_stats(uint16_t nq, + struct rte_pdump_stats *stats, struct rte_pdump_stats *total) { uint64_t *sum = (uint64_t *)total; @@ -718,7 +718,7 @@ pdump_sum_stats(uint16_t port, uint16_t nq, uint16_t qid; for (qid = 0; qid < nq; qid++) { - const RTE_ATOMIC(uint64_t) *perq = (const uint64_t __rte_atomic *)&stats[port][qid]; + const RTE_ATOMIC(uint64_t) *perq = (const uint64_t __rte_atomic *)&stats[qid]; for (i = 0; i < sizeof(*total) / sizeof(uint64_t); i++) { val = rte_atomic_load_explicit(&perq[i], rte_memory_order_relaxed); @@ -762,7 +762,7 @@ rte_pdump_stats(uint16_t port, struct rte_pdump_stats *stats) pdump_stats = mz->addr; } - pdump_sum_stats(port, dev_info.nb_rx_queues, pdump_stats->rx, stats); - pdump_sum_stats(port, dev_info.nb_tx_queues, pdump_stats->tx, stats); + pdump_sum_stats(dev_info.nb_rx_queues, pdump_stats->rx[port], stats); + pdump_sum_stats(dev_info.nb_tx_queues, pdump_stats->tx[port], stats); return 0; } -- 2.43.0