patch 'common/sfc_efx/base: reduce stack in get addr regions MCDI' has been queued to stable release 25.11.5
Kevin Traynor
ktraynor at redhat.com
Thu Dec 3 13:59:06 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/48bdb4f463439d61cb109ad2a865831beaca0e2c
Thanks.
Kevin
---
>From 48bdb4f463439d61cb109ad2a865831beaca0e2c Mon Sep 17 00:00:00 2001
From: Andy Moreton <andy.moreton at amd.com>
Date: Fri, 14 Aug 2026 16:54:26 +0400
Subject: [PATCH] common/sfc_efx/base: reduce stack in get addr regions MCDI
[ upstream commit 8620e8b6879854f8a2a40a62f4657bf82c87cb50 ]
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 | 26 ++++++++++++++++++++------
1 file changed, 20 insertions(+), 6 deletions(-)
diff --git a/drivers/common/sfc_efx/base/efx_mcdi.c b/drivers/common/sfc_efx/base/efx_mcdi.c
index 20051c7da9..3b2cf8ac61 100644
--- a/drivers/common/sfc_efx/base/efx_mcdi.c
+++ b/drivers/common/sfc_efx/base/efx_mcdi.c
@@ -3440,8 +3440,8 @@ efx_mcdi_get_nic_addr_regions(
__out efx_nic_dma_region_info_t *endrip)
{
- EFX_MCDI_DECLARE_BUF(payload, MC_CMD_GET_DESC_ADDR_REGIONS_IN_LEN,
- MC_CMD_GET_DESC_ADDR_REGIONS_OUT_LENMAX_MCDI2);
+ uint8_t *payload = NULL;
efx_xword_t *regions;
efx_mcdi_req_t req;
+ size_t size;
efx_rc_t rc;
size_t alloc_size;
@@ -3449,4 +3449,13 @@ efx_mcdi_get_nic_addr_regions(
unsigned int i;
+ size = EFX_MCDI_BUF_SIZE(MC_CMD_GET_DESC_ADDR_REGIONS_IN_LEN,
+ MC_CMD_GET_DESC_ADDR_REGIONS_OUT_LENMAX_MCDI2);
+
+ EFSYS_KMEM_ALLOC(enp->en_esip, size, payload);
+ if (payload == NULL) {
+ rc = ENOMEM;
+ goto fail1;
+ }
+
req.emr_cmd = MC_CMD_GET_DESC_ADDR_REGIONS;
req.emr_in_buf = payload;
@@ -3459,5 +3468,5 @@ efx_mcdi_get_nic_addr_regions(
if (req.emr_rc != 0) {
rc = req.emr_rc;
- goto fail1;
+ goto fail2;
}
@@ -3465,5 +3474,5 @@ efx_mcdi_get_nic_addr_regions(
MC_CMD_GET_DESC_ADDR_REGIONS_OUT_LENMIN) {
rc = EMSGSIZE;
- goto fail2;
+ goto fail3;
}
@@ -3478,5 +3487,5 @@ efx_mcdi_get_nic_addr_regions(
if (alloc_size / sizeof (endrip->endri_regions[0]) != nregions) {
rc = ENOMEM;
- goto fail3;
+ goto fail4;
}
@@ -3486,5 +3495,5 @@ efx_mcdi_get_nic_addr_regions(
if (endrip->endri_regions == NULL) {
rc = ENOMEM;
- goto fail4;
+ goto fail5;
}
@@ -3518,6 +3527,10 @@ efx_mcdi_get_nic_addr_regions(
}
+ EFSYS_KMEM_FREE(enp->en_esip, size, payload);
+
return (0);
+fail5:
+ EFSYS_PROBE(fail5);
fail4:
EFSYS_PROBE(fail4);
@@ -3526,4 +3539,5 @@ fail3:
fail2:
EFSYS_PROBE(fail2);
+ EFSYS_KMEM_FREE(enp->en_esip, size, payload);
fail1:
EFSYS_PROBE1(fail1, efx_rc_t, rc);
--
2.56.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-12-03 12:52:39.926114174 +0000
+++ 0020-common-sfc_efx-base-reduce-stack-in-get-addr-regions.patch 2026-12-03 12:52:39.027938572 +0000
@@ -1 +1 @@
-From 8620e8b6879854f8a2a40a62f4657bf82c87cb50 Mon Sep 17 00:00:00 2001
+From 48bdb4f463439d61cb109ad2a865831beaca0e2c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8620e8b6879854f8a2a40a62f4657bf82c87cb50 ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
-index 670b0d5cda..4be736dcb9 100644
+index 20051c7da9..3b2cf8ac61 100644
More information about the stable
mailing list