patch 'net/sfc: fix calloc parameters' has been queued to stable release 23.11.1

Xueming Li xuemingl at nvidia.com
Tue Mar 5 10:46:30 CET 2024


Hi,

FYI, your patch has been queued to stable release 23.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/31/24. 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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=63241d76621b2accf88e511aa2fcf2b63f0a870e

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 63241d76621b2accf88e511aa2fcf2b63f0a870e Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit at amd.com>
Date: Wed, 24 Jan 2024 18:54:05 +0000
Subject: [PATCH] net/sfc: fix calloc parameters
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 351f656ed67277f175de0a2baf296eed7e3fb21d ]

gcc [1] generates warning [2] about rte_calloc usage, because
rte_calloc parameter order is wrong, fixing it by replacing parameters.

[1]
gcc (GCC) 14.0.1 20240124 (experimental)

[2]
Compiling C object drivers/libtmp_rte_net_sfc.a.p/net_sfc_sfc_mae.c.o
../net/sfc/sfc_mae.c: In function ‘sfc_mae_action_set_list_add’:
../drivers/net/sfc/sfc_mae.c:1353:35:
 warning: ‘rte_calloc’ sizes specified with ‘sizeof’ in the earlier
 argument and not in the later argument [-Wcalloc-transposed-args]
 1353 |                    sizeof(struct sfc_mae_action_set *),
      |                           ^~~~~~

Fixes: 002f591f54c3 ("net/sfc: support packet replay in transfer flows")

Signed-off-by: Ferruh Yigit <ferruh.yigit at amd.com>
Acked-by: Morten Brørup <mb at smartsharesystems.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
---
 drivers/net/sfc/sfc_mae.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c
index e5ec0ae49d..60ff6d2181 100644
--- a/drivers/net/sfc/sfc_mae.c
+++ b/drivers/net/sfc/sfc_mae.c
@@ -1350,8 +1350,8 @@ sfc_mae_action_set_list_add(struct sfc_adapter *sa,

 	action_set_list->action_sets =
 		rte_calloc("sfc_mae_action_set_list_action_sets",
-			   sizeof(struct sfc_mae_action_set *),
-			   action_set_list->nb_action_sets, 0);
+			   action_set_list->nb_action_sets,
+			   sizeof(struct sfc_mae_action_set *), 0);
 	if (action_set_list->action_sets == NULL) {
 		sfc_err(sa, "failed to allocate action set list");
 		rte_free(action_set_list);
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:32.477893550 +0800
+++ 0049-net-sfc-fix-calloc-parameters.patch	2024-03-05 17:39:30.753566492 +0800
@@ -1 +1 @@
-From 351f656ed67277f175de0a2baf296eed7e3fb21d Mon Sep 17 00:00:00 2001
+From 63241d76621b2accf88e511aa2fcf2b63f0a870e Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 351f656ed67277f175de0a2baf296eed7e3fb21d ]
@@ -25 +27,0 @@
-Cc: stable at dpdk.org


More information about the stable mailing list