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 0EF6148AEF for ; Wed, 12 Nov 2025 17:54:07 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0A055402A0; Wed, 12 Nov 2025 17:54:07 +0100 (CET) Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by mails.dpdk.org (Postfix) with ESMTP id 0AFA840B9F for ; Wed, 12 Nov 2025 17:54:05 +0100 (CET) Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-47721743fd0so6242005e9.2 for ; Wed, 12 Nov 2025 08:54:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1762966445; x=1763571245; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=U/4AU0MvoMrUu9WLXpn710zh9xhIkSS+5gOjJf7PjvM=; b=hicWfe807zRg6khMGWktfHyRLxj+dsuk9xkg58muIYwe0YfbZEqYpzswrhWBD6erCx TBSUEy8bCefcW7/qc5oq8voIY3HqEOY5NiQxtZRTp1b1KWkH9vUhEp1Gitz1TQIlTJiD K/eY1/5mVcaUZKn4T90sMn89lJIAIGjC2AV+wwhMa6mTU/Jua73zKT3jTSejwCyT5sVN hTsklee9LGU1tjozJVWLAi7jOq12rHKEc7eHdq0kebWzWeEs66zZ/usCJFTMx4XWGqs8 o98m/Vhz0ko9u15xae74PmLW2+ZJE51Cke+8Yq+SmbepTi00AzYBBL2o783+6kffSgya CCsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762966445; x=1763571245; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=U/4AU0MvoMrUu9WLXpn710zh9xhIkSS+5gOjJf7PjvM=; b=vmsctsg73tCKYjjrwyzlf5PnCCf25LBgGisymdN/DBVXob7hw/xWODEM3E9tIfWIkM 7Zvlpme9K4QwFlJoq/cb8lUxiFf549Cc15gyUfIG/luuklLV6YKxMGhyn/1d9z2DxGbp 9OFA7rrlRvZis/c9OJlBLdna6Ez2TmTDoUBvr2Vz4TU1UV0X60mOgQ4Dd+n0AITYDQoz 0uE9l5zKV58blHgBmiq7S57QkGkfkaD7rjni1jcT2D6gDnhV3/YA/wD32DUXEkyF8N2L yty+lmIqYEkcFAyxdKFBdpqaVCyjbXfVY8LwYG4om0js8QDZe3kidv9gxl5i50Xsu2EM xHuw== X-Gm-Message-State: AOJu0YzEhEvfYIJi4kWbNZNrih5HwyhuhlOfx4JPoyAJdQyDUNWhgW1m za0MHmwd/3jEdiRkjhGek8yaAF2wMtBVPTp1SjCFVqNNqtH4bDpt5zYmCql0cA== X-Gm-Gg: ASbGnctO07BNXWQtVfbEkW7QGw+HNfsuCzF93jAvrWkfJ4mv+fBJldLeCVfyVlxs6xi 6rRX1UFvJswDKT6tICC9Ze3zuqORtu3cQBC2XmD4FhZeiGlGUtgzsFhXMuzKn5cy5jsmNtArb8u EJaC4/PFQzQxrtMVZX9JV7/B1mXiz8ZC1OfQhIJpT6ymYlSEwJKIWozIklCWh3eBV8deElJ5K6L zFryuz+7aUhURCEa0p42D0Gsz5ipfL56OM9FYRfK7Mz9mW0snlnkjGLD8CfZs16uSxMkqn1ipCp cZp2b6+wQ/HuayG5m9ADzpCactfkQ8LMWWBf9XNbdlrM3k+btyCLLBuRnVz0N0UFcRUPIt7vmws Md9yvP24osF3jUvih+XDyG39lSS6dytTXCYBqpJCkjKyWk803COppFWG92haveX4+LtEQEM1IBb G4fzjZ6w== X-Google-Smtp-Source: AGHT+IGy1B5EWB4vH8EswRMUxFd/7DB7ScDly5fyAI3inf/rXtOB1bz9pFm7IseAMgYbVFRNsxVFYA== X-Received: by 2002:a05:600c:6287:b0:477:7925:f7fb with SMTP id 5b1f17b1804b1-4778707baf9mr31575475e9.10.1762966444305; Wed, 12 Nov 2025 08:54:04 -0800 (PST) Received: from localhost ([2a01:4b00:d036:ae00:a397:14bc:5982:5745]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-47787e3a62esm45546365e9.3.2025.11.12.08.54.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Nov 2025 08:54:03 -0800 (PST) From: luca.boccassi@gmail.com To: Jiawen Wu Cc: dpdk stable Subject: patch 'net/ngbe: reduce memory size of ring descriptors' has been queued to stable release 22.11.11 Date: Wed, 12 Nov 2025 16:52:32 +0000 Message-ID: <20251112165308.1618107-18-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251112165308.1618107-1-luca.boccassi@gmail.com> References: <20251027162001.3710450-79-luca.boccassi@gmail.com> <20251112165308.1618107-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 22.11.11 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/14/25. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/c660b80d3906293812390a644fdcee8363f92c09 Thanks. Luca Boccassi --- >From c660b80d3906293812390a644fdcee8363f92c09 Mon Sep 17 00:00:00 2001 From: Jiawen Wu Date: Mon, 27 Oct 2025 11:15:27 +0800 Subject: [PATCH] net/ngbe: reduce memory size of ring descriptors [ upstream commit 22d4fffbbc99ef2a229869e717a12b2e33c68a9c ] The memory of ring descriptors was allocated in size of the maximum ring size. It seems not friendly to our hardware on some domestic platforms. Change it to allocate in size of the real ring size. Fixes: 43b7e5ea60ac ("net/ngbe: support Rx queue setup/release") Signed-off-by: Jiawen Wu --- drivers/net/ngbe/ngbe_rxtx.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/drivers/net/ngbe/ngbe_rxtx.c b/drivers/net/ngbe/ngbe_rxtx.c index 8490b08318..2aaa3c878a 100644 --- a/drivers/net/ngbe/ngbe_rxtx.c +++ b/drivers/net/ngbe/ngbe_rxtx.c @@ -1983,13 +1983,9 @@ ngbe_dev_tx_queue_setup(struct rte_eth_dev *dev, if (txq == NULL) return -ENOMEM; - /* - * Allocate Tx ring hardware descriptors. A memzone large enough to - * handle the maximum ring size is allocated in order to allow for - * resizing in later calls to the queue setup function. - */ + /* Allocate Tx ring hardware descriptors. */ tz = rte_eth_dma_zone_reserve(dev, "tx_ring", queue_idx, - sizeof(struct ngbe_tx_desc) * NGBE_RING_DESC_MAX, + sizeof(struct ngbe_tx_desc) * nb_desc, NGBE_ALIGN, socket_id); if (tz == NULL) { ngbe_tx_queue_release(txq); @@ -2236,6 +2232,7 @@ ngbe_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t len; struct ngbe_adapter *adapter = ngbe_dev_adapter(dev); uint64_t offloads; + uint32_t size; PMD_INIT_FUNC_TRACE(); hw = ngbe_dev_hw(dev); @@ -2269,13 +2266,10 @@ ngbe_dev_rx_queue_setup(struct rte_eth_dev *dev, rxq->rx_deferred_start = rx_conf->rx_deferred_start; rxq->offloads = offloads; - /* - * Allocate Rx ring hardware descriptors. A memzone large enough to - * handle the maximum ring size is allocated in order to allow for - * resizing in later calls to the queue setup function. - */ + /* Allocate Rx ring hardware descriptors. */ + size = (nb_desc + RTE_PMD_NGBE_RX_MAX_BURST) * sizeof(struct ngbe_rx_desc); rz = rte_eth_dma_zone_reserve(dev, "rx_ring", queue_idx, - RX_RING_SZ, NGBE_ALIGN, socket_id); + size, NGBE_ALIGN, socket_id); if (rz == NULL) { ngbe_rx_queue_release(rxq); return -ENOMEM; @@ -2285,7 +2279,7 @@ ngbe_dev_rx_queue_setup(struct rte_eth_dev *dev, /* * Zero init all the descriptors in the ring. */ - memset(rz->addr, 0, RX_RING_SZ); + memset(rz->addr, 0, size); rxq->rdt_reg_addr = NGBE_REG_ADDR(hw, NGBE_RXWP(rxq->reg_idx)); rxq->rdh_reg_addr = NGBE_REG_ADDR(hw, NGBE_RXRP(rxq->reg_idx)); -- 2.47.3 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-11-12 16:20:41.645754471 +0000 +++ 0018-net-ngbe-reduce-memory-size-of-ring-descriptors.patch 2025-11-12 16:20:40.903716354 +0000 @@ -1 +1 @@ -From 22d4fffbbc99ef2a229869e717a12b2e33c68a9c Mon Sep 17 00:00:00 2001 +From c660b80d3906293812390a644fdcee8363f92c09 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 22d4fffbbc99ef2a229869e717a12b2e33c68a9c ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index a60421293b..03ada844bf 100644 +index 8490b08318..2aaa3c878a 100644 @@ -22 +23 @@ -@@ -2058,13 +2058,9 @@ ngbe_dev_tx_queue_setup(struct rte_eth_dev *dev, +@@ -1983,13 +1983,9 @@ ngbe_dev_tx_queue_setup(struct rte_eth_dev *dev, @@ -38 +39 @@ -@@ -2324,6 +2320,7 @@ ngbe_dev_rx_queue_setup(struct rte_eth_dev *dev, +@@ -2236,6 +2232,7 @@ ngbe_dev_rx_queue_setup(struct rte_eth_dev *dev, @@ -46 +47 @@ -@@ -2357,13 +2354,10 @@ ngbe_dev_rx_queue_setup(struct rte_eth_dev *dev, +@@ -2269,13 +2266,10 @@ ngbe_dev_rx_queue_setup(struct rte_eth_dev *dev, @@ -63 +64 @@ -@@ -2373,7 +2367,7 @@ ngbe_dev_rx_queue_setup(struct rte_eth_dev *dev, +@@ -2285,7 +2279,7 @@ ngbe_dev_rx_queue_setup(struct rte_eth_dev *dev,