patch 'common/sfc_efx/base: reduce stack in set addr regions MCDI' has been queued to stable release 25.11.5

Kevin Traynor ktraynor at redhat.com
Thu Dec 3 13:59:07 CET 2026


Hi,

FYI, your patch has been queued to stable release 25.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/08/26. 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/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/360ab70299c97b7b6f4d54eb83c79f79f7c56873

Thanks.

Kevin

---
>From 360ab70299c97b7b6f4d54eb83c79f79f7c56873 Mon Sep 17 00:00:00 2001
From: Andy Moreton <andy.moreton at amd.com>
Date: Fri, 14 Aug 2026 16:54:27 +0400
Subject: [PATCH] common/sfc_efx/base: reduce stack in set addr regions MCDI

[ upstream commit 5eff72383f3a773eb8aa501a6a3b9c53916c4d5d ]

Code analysis reports an error for excessive stack consumption
(over 1KB). Use a heap allocated payload buffer instead.

Fixes: 60fb370c7bc9 ("common/sfc_efx/base: support NIC DMA memory regions API")

Signed-off-by: Andy Moreton <andy.moreton at amd.com>
Reviewed-by: Ivan Malov <ivan.malov at arknetworks.am>
Reviewed-by: Viacheslav Galaktionov <viacheslav.galaktionov at arknetworks.am>
---
 drivers/common/sfc_efx/base/efx_mcdi.c | 22 ++++++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)

diff --git a/drivers/common/sfc_efx/base/efx_mcdi.c b/drivers/common/sfc_efx/base/efx_mcdi.c
index 3b2cf8ac61..e045f5d596 100644
--- a/drivers/common/sfc_efx/base/efx_mcdi.c
+++ b/drivers/common/sfc_efx/base/efx_mcdi.c
@@ -3551,10 +3551,9 @@ efx_mcdi_set_nic_addr_regions(
 	__in		const efx_nic_dma_region_info_t *endrip)
 {
-	EFX_MCDI_DECLARE_BUF(payload,
-		MC_CMD_SET_DESC_ADDR_REGIONS_IN_LENMAX_MCDI2,
-		MC_CMD_SET_DESC_ADDR_REGIONS_OUT_LEN);
 	efx_qword_t *trgt_addr_base;
+	uint8_t *payload = NULL;
 	efx_mcdi_req_t req;
 	unsigned int i;
+	size_t size;
 	efx_rc_t rc;
 
@@ -3565,4 +3564,14 @@ efx_mcdi_set_nic_addr_regions(
 	}
 
+	size = EFX_MCDI_BUF_SIZE(
+	    MC_CMD_SET_DESC_ADDR_REGIONS_IN_LEN(endrip->endri_count),
+	    MC_CMD_SET_DESC_ADDR_REGIONS_OUT_LEN);
+
+	EFSYS_KMEM_ALLOC(enp->en_esip, size, payload);
+	if (payload == NULL) {
+		rc = ENOMEM;
+		goto fail2;
+	}
+
 	req.emr_cmd = MC_CMD_SET_DESC_ADDR_REGIONS;
 	req.emr_in_buf = payload;
@@ -3599,9 +3608,14 @@ efx_mcdi_set_nic_addr_regions(
 	if (req.emr_rc != 0) {
 		rc = req.emr_rc;
-		goto fail2;
+		goto fail3;
 	}
 
+	EFSYS_KMEM_FREE(enp->en_esip, size, payload);
+
 	return (0);
 
+fail3:
+	EFSYS_PROBE(fail3);
+	EFSYS_KMEM_FREE(enp->en_esip, size, payload);
 fail2:
 	EFSYS_PROBE(fail2);
-- 
2.56.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-12-03 12:52:39.955507629 +0000
+++ 0021-common-sfc_efx-base-reduce-stack-in-set-addr-regions.patch	2026-12-03 12:52:39.028917040 +0000
@@ -1 +1 @@
-From 5eff72383f3a773eb8aa501a6a3b9c53916c4d5d Mon Sep 17 00:00:00 2001
+From 360ab70299c97b7b6f4d54eb83c79f79f7c56873 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5eff72383f3a773eb8aa501a6a3b9c53916c4d5d ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
-index 4be736dcb9..04f2c99c0b 100644
+index 3b2cf8ac61..e045f5d596 100644



More information about the stable mailing list