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 E90A7457C0; Wed, 14 Aug 2024 12:51:43 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 156E042DDC; Wed, 14 Aug 2024 12:50:43 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by mails.dpdk.org (Postfix) with ESMTP id 7A85942D90 for ; Wed, 14 Aug 2024 12:50:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1723632640; x=1755168640; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Mdz+2zjQJzJ1Ft52hQmGU/XWBMgBZj3Lwlb/j2syexQ=; b=N2ubEK6i8M42pPBhxyujIxMysQeUKP4o92yq+oTiQeKhS/8P4gshDlU9 Cjps60jmROjjlJopeLIM5cbGZ7Ft7TS1Z1VQ6lgErgGeg7P28mgE9eOw3 cYZcLUvdTuZh1nhreJobGarG075IcqzETHR0gozNgKkC3Ws2AyQLSg84j 6JacKMg7wplkJ5alAJx5YDazJkJbH1zdFrV6JTKVaumO4UPfbSkcKvWnR A31rQXqZP91egx+/5Co8PCqCk1a4znkw4z3VwPB2nBJbUWdV53XZz8KV4 jk/xVyvQP17vek9OM3qH+aaCufRS18b7nQETCL0lvsOW7nFgj64BBJcEI g==; X-CSE-ConnectionGUID: bjFestcuQG2DX5obSlB57A== X-CSE-MsgGUID: D+ITLG/VRe+HpFby54PCdg== X-IronPort-AV: E=McAfee;i="6700,10204,11163"; a="44360339" X-IronPort-AV: E=Sophos;i="6.09,145,1716274800"; d="scan'208";a="44360339" 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:40 -0700 X-CSE-ConnectionGUID: Aek2cBD2RCWvutJpNDOSFQ== X-CSE-MsgGUID: hsDaIUrQR2C7DJEQ1Wehgg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,145,1716274800"; d="scan'208";a="96481750" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.25]) by orviesa001.jf.intel.com with ESMTP; 14 Aug 2024 03:50:39 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: ferruh.yigit@amd.com, thomas@monjalon.net, mb@smartsharesystems.com, Bruce Richardson Subject: [PATCH v3 16/26] net/sfc: use separate Rx and Tx queue limits Date: Wed, 14 Aug 2024 11:49:22 +0100 Message-ID: <20240814104933.14062-17-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 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 Acked-by: Morten Brørup --- 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