-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
treewide: fix strict-aliasing errors
How valid/stupid/useless/dangerous is this patch? I don't know. Hopefully, we'll find out soon enough. Signed-off-by: Robin Jarry <[email protected]>
- Loading branch information
Showing
17 changed files
with
64 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
subprojects/packagefiles/dpdk/mbuf-fix-strict-aliasing-error.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
From 880c9688cf7403846dbf6ef0191e722d62a16a23 Mon Sep 17 00:00:00 2001 | ||
From: Robin Jarry <[email protected]> | ||
Date: Wed, 27 Mar 2024 22:22:13 +0100 | ||
Subject: [PATCH] mbuf: fix strict-aliasing error | ||
|
||
Signed-off-by: Robin Jarry <[email protected]> | ||
--- | ||
lib/mbuf/rte_mbuf.h | 4 ++-- | ||
1 file changed, 2 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/lib/mbuf/rte_mbuf.h b/lib/mbuf/rte_mbuf.h | ||
index 286b32b788a5..0076f0d80ba8 100644 | ||
--- a/lib/mbuf/rte_mbuf.h | ||
+++ b/lib/mbuf/rte_mbuf.h | ||
@@ -595,9 +595,9 @@ __rte_mbuf_raw_sanity_check(__rte_unused const struct rte_mbuf *m) | ||
*/ | ||
static inline struct rte_mbuf *rte_mbuf_raw_alloc(struct rte_mempool *mp) | ||
{ | ||
- struct rte_mbuf *m; | ||
+ void *m; | ||
|
||
- if (rte_mempool_get(mp, (void **)&m) < 0) | ||
+ if (rte_mempool_get(mp, &m) < 0) | ||
return NULL; | ||
__rte_mbuf_raw_sanity_check(m); | ||
return m; | ||
-- | ||
2.44.0 | ||
|