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 DF8C9457BB; Wed, 14 Aug 2024 09:50:18 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B6E0042791; Wed, 14 Aug 2024 09:49:00 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) by mails.dpdk.org (Postfix) with ESMTP id DE24F40E01 for ; Tue, 13 Aug 2024 18:00:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1723564836; x=1755100836; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=YfRpC5PdG4qsuFU6xKhx9YflHX43OVb5Vhy6tYj25FY=; b=QVV7C+XNtX22ibCde2duC7/q4u33h+L2Zb62Db9h1qFIM1ygUkfTmKNZ Aw79mGuVKcXpaksBLiqh0Yh+4EFwX7bPocGvH0tmc8MFYwRJ33DBkZjED sJfBNwF3qT5Rbq7hOIG4tGhO9JnHR5/dZmtLjw5c7vr4nFoDF2/AVC8pr oboVVoKfGPdRynrBOD1UKrfW5wj/ra+12vFZUf7JL0Z2IXAUBAXT80HAx gL893TSPOFgo/ZMzPPF3w0bfb4y7dj1ZpJpUCGrgp8i7KErnAyQkecrjn dXD4xy1ZU3xMYWLjnvdWQgy+W5Or/iSnlWu4FzPYSBjlx8mk04ZG8gFAI w==; X-CSE-ConnectionGUID: jG33DwsmSR2dkGJXIe72JQ== X-CSE-MsgGUID: 8NZetWDqR664qfYSkS4jvw== X-IronPort-AV: E=McAfee;i="6700,10204,11163"; a="12987865" X-IronPort-AV: E=Sophos;i="6.09,286,1716274800"; d="scan'208";a="12987865" 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:36 -0700 X-CSE-ConnectionGUID: mFLfCb3sQ+Gh9H0LjRmGDQ== X-CSE-MsgGUID: LKla0710SXi40pt/6Bhi3g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,286,1716274800"; d="scan'208";a="58406513" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.25]) by fmviesa007.fm.intel.com with ESMTP; 13 Aug 2024 09:00:34 -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 16/26] net/sfc: use separate Rx and Tx queue limits Date: Tue, 13 Aug 2024 16:59:53 +0100 Message-ID: <20240813160003.423935-17-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: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 Update driver 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 --- drivers/net/sfc/sfc_sw_stats.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/sfc/sfc_sw_stats.c b/drivers/net/sfc/sfc_sw_stats.c index 3ae5023b6f..27892e7d4f 100644 --- a/drivers/net/sfc/sfc_sw_stats.c +++ b/drivers/net/sfc/sfc_sw_stats.c @@ -825,9 +825,11 @@ sfc_sw_xstats_alloc_queues_bitmap(struct sfc_adapter *sa) struct rte_bitmap **queues_bitmap = &sa->sw_stats.queues_bitmap; void **queues_bitmap_mem = &sa->sw_stats.queues_bitmap_mem; uint32_t bmp_size; + uint32_t max_queues = RTE_MAX(RTE_MAX_ETHPORT_RX_QUEUES, + RTE_MAX_ETHPORT_TX_QUEUES); int rc; - bmp_size = rte_bitmap_get_memory_footprint(RTE_MAX_QUEUES_PER_PORT); + bmp_size = rte_bitmap_get_memory_footprint(max_queues); *queues_bitmap_mem = NULL; *queues_bitmap = NULL; @@ -836,7 +838,7 @@ sfc_sw_xstats_alloc_queues_bitmap(struct sfc_adapter *sa) if (*queues_bitmap_mem == NULL) return ENOMEM; - *queues_bitmap = rte_bitmap_init(RTE_MAX_QUEUES_PER_PORT, + *queues_bitmap = rte_bitmap_init(max_queues, *queues_bitmap_mem, bmp_size); if (*queues_bitmap == NULL) { rc = EINVAL; -- 2.43.0