patch 'common/sfc_efx/base: reduce stack in set addr regions MCDI' has been queued to stable release 24.11.9
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Tue Oct 27 12:48:33 CET 2026
Hi,
FYI, your patch has been queued to stable release 24.11.9
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 10/29/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/0153ac8033fde5cdfc104a1a4fadd769650b527a
Thanks.
Luca Boccassi
---
>From 0153ac8033fde5cdfc104a1a4fadd769650b527a 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 62d381f950f..31725db52c9 100644
--- a/drivers/common/sfc_efx/base/efx_mcdi.c
+++ b/drivers/common/sfc_efx/base/efx_mcdi.c
@@ -3536,12 +3536,11 @@ efx_mcdi_set_nic_addr_regions(
__in efx_nic_t *enp,
__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;
if (endrip->endri_count >
@@ -3550,6 +3549,16 @@ efx_mcdi_set_nic_addr_regions(
goto fail1;
}
+ 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;
req.emr_in_length =
@@ -3584,11 +3593,16 @@ 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);
fail1:
--
2.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-10-27 11:43:54.502858503 +0000
+++ 0019-common-sfc_efx-base-reduce-stack-in-set-addr-regions.patch 2026-10-27 11:43:53.510059325 +0000
@@ -1 +1 @@
-From 5eff72383f3a773eb8aa501a6a3b9c53916c4d5d Mon Sep 17 00:00:00 2001
+From 0153ac8033fde5cdfc104a1a4fadd769650b527a 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 62d381f950f..31725db52c9 100644
@@ -23 +24 @@
-@@ -3550,12 +3550,11 @@ efx_mcdi_set_nic_addr_regions(
+@@ -3536,12 +3536,11 @@ efx_mcdi_set_nic_addr_regions(
@@ -38 +39 @@
-@@ -3564,6 +3563,16 @@ efx_mcdi_set_nic_addr_regions(
+@@ -3550,6 +3549,16 @@ efx_mcdi_set_nic_addr_regions(
@@ -55 +56 @@
-@@ -3598,11 +3607,16 @@ efx_mcdi_set_nic_addr_regions(
+@@ -3584,11 +3593,16 @@ efx_mcdi_set_nic_addr_regions(
More information about the stable
mailing list