patch 'mempool: replace GCC pragma with cast' has been queued to stable release 22.11.6

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue Jun 25 01:58:29 CEST 2024


Hi,

FYI, your patch has been queued to stable release 22.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/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://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/9cdf5aecb261e85cc3ae75eda57a34c7a201b3d5

Thanks.

Luca Boccassi

---
>From 9cdf5aecb261e85cc3ae75eda57a34c7a201b3d5 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Mon, 1 Apr 2024 10:01:52 -0700
Subject: [PATCH] mempool: replace GCC pragma with cast

[ upstream commit 23dc03f67279f6ced3dafd2e4c76c1b67a0102dc ]

Building mempool with MSVC generates a warning
because of this pragma (same with clang when debug is enabled).
The issue the pragma was working around can be better solved
by using an additional cast.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
Acked-by: Tyler Retzlaff <roretzla at linux.microsoft.com>
---
 lib/mempool/rte_mempool.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/lib/mempool/rte_mempool.c b/lib/mempool/rte_mempool.c
index 3de857abf5..258754cf67 100644
--- a/lib/mempool/rte_mempool.c
+++ b/lib/mempool/rte_mempool.c
@@ -1054,10 +1054,6 @@ rte_mempool_dump_cache(FILE *f, const struct rte_mempool *mp)
 	return count;
 }
 
-#ifndef __INTEL_COMPILER
-#pragma GCC diagnostic ignored "-Wcast-qual"
-#endif
-
 /* check and update cookies or panic (internal) */
 void rte_mempool_check_cookies(const struct rte_mempool *mp,
 	void * const *obj_table_const, unsigned n, int free)
@@ -1072,7 +1068,7 @@ void rte_mempool_check_cookies(const struct rte_mempool *mp,
 
 	/* Force to drop the "const" attribute. This is done only when
 	 * DEBUG is enabled */
-	tmp = (void *) obj_table_const;
+	tmp = (void *)(uintptr_t)obj_table_const;
 	obj_table = tmp;
 
 	while (n--) {
@@ -1181,10 +1177,6 @@ mempool_audit_cookies(struct rte_mempool *mp)
 #define mempool_audit_cookies(mp) do {} while(0)
 #endif
 
-#ifndef __INTEL_COMPILER
-#pragma GCC diagnostic error "-Wcast-qual"
-#endif
-
 /* check cookies before and after objects */
 static void
 mempool_audit_cache(const struct rte_mempool *mp)
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-06-25 00:22:16.153274784 +0100
+++ 0043-mempool-replace-GCC-pragma-with-cast.patch	2024-06-25 00:22:13.165185241 +0100
@@ -1 +1 @@
-From 23dc03f67279f6ced3dafd2e4c76c1b67a0102dc Mon Sep 17 00:00:00 2001
+From 9cdf5aecb261e85cc3ae75eda57a34c7a201b3d5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 23dc03f67279f6ced3dafd2e4c76c1b67a0102dc ]
+
@@ -20 +22 @@
-index 7a98441a87..ff67fe4181 100644
+index 3de857abf5..258754cf67 100644
@@ -23 +25 @@
-@@ -1056,10 +1056,6 @@ rte_mempool_dump_cache(FILE *f, const struct rte_mempool *mp)
+@@ -1054,10 +1054,6 @@ rte_mempool_dump_cache(FILE *f, const struct rte_mempool *mp)
@@ -34 +36 @@
-@@ -1074,7 +1070,7 @@ void rte_mempool_check_cookies(const struct rte_mempool *mp,
+@@ -1072,7 +1068,7 @@ void rte_mempool_check_cookies(const struct rte_mempool *mp,
@@ -43 +45 @@
-@@ -1183,10 +1179,6 @@ mempool_audit_cookies(struct rte_mempool *mp)
+@@ -1181,10 +1177,6 @@ mempool_audit_cookies(struct rte_mempool *mp)


More information about the stable mailing list