patch 'eal: fix type in destructor macro for MSVC' has been queued to stable release 23.11.2

Xueming Li xuemingl at nvidia.com
Fri Jul 12 12:43:48 CEST 2024


Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/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=09e70301eeb0804dfa0b0ed6e1f06177b440c396

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 09e70301eeb0804dfa0b0ed6e1f06177b440c396 Mon Sep 17 00:00:00 2001
From: Tyler Retzlaff <roretzla at linux.microsoft.com>
Date: Tue, 16 Apr 2024 09:33:24 -0700
Subject: [PATCH] eal: fix type in destructor macro for MSVC
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit e5bf3e397b34082673b9fe06f4b8f667c8e4913d ]

RTE_FINI expansion failed to specify void * type for storage of
destructor function pointer resulting it defaulting to type ``int``.

Update the macro to specify ``void *`` as the type so the correct size
is allocated in the segment.

Fixes: 64eff943ca82 ("eal: implement constructors for MSVC")

Signed-off-by: Tyler Retzlaff <roretzla at linux.microsoft.com>
Acked-by: Morten Brørup <mb at smartsharesystems.com>
---
 lib/eal/include/rte_common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/eal/include/rte_common.h b/lib/eal/include/rte_common.h
index c1ba32d00e..40af7164af 100644
--- a/lib/eal/include/rte_common.h
+++ b/lib/eal/include/rte_common.h
@@ -267,7 +267,7 @@ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void)
 #define RTE_FINI_PRIO(name, priority) \
 	static void name(void); \
 	__pragma(const_seg(DTOR_PRIORITY_TO_SECTION(priority))) \
-	__declspec(allocate(DTOR_PRIORITY_TO_SECTION(priority))) name ## _pointer = &name; \
+	__declspec(allocate(DTOR_PRIORITY_TO_SECTION(priority))) void *name ## _pointer = &name; \
 	__pragma(const_seg()) \
 	static void name(void)
 #endif
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:14.502547379 +0800
+++ 0002-eal-fix-type-in-destructor-macro-for-MSVC.patch	2024-07-12 18:40:13.896594252 +0800
@@ -1 +1 @@
-From e5bf3e397b34082673b9fe06f4b8f667c8e4913d Mon Sep 17 00:00:00 2001
+From 09e70301eeb0804dfa0b0ed6e1f06177b440c396 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit e5bf3e397b34082673b9fe06f4b8f667c8e4913d ]
@@ -16 +18,0 @@
-Cc: stable at dpdk.org
@@ -25 +27 @@
-index 298a5c6215..618ed5694c 100644
+index c1ba32d00e..40af7164af 100644
@@ -28 +30 @@
-@@ -291,7 +291,7 @@ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void)
+@@ -267,7 +267,7 @@ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void)


More information about the stable mailing list