[PATCH v5 14/16] app/test: pack structures when building with MSVC
Andre Muezerie
andremue at linux.microsoft.com
Tue Nov 19 05:35:39 CET 2024
From: Tyler Retzlaff <roretzla at linux.microsoft.com>
Add __rte_msvc_pack to all __rte_packed structs to cause packing
when building with MSVC.
Signed-off-by: Tyler Retzlaff <roretzla at linux.microsoft.com>
---
app/test/test_efd.c | 1 +
app/test/test_hash.c | 1 +
app/test/test_member.c | 1 +
3 files changed, 3 insertions(+)
diff --git a/app/test/test_efd.c b/app/test/test_efd.c
index 1c0986b9bc..df176a0fbb 100644
--- a/app/test/test_efd.c
+++ b/app/test/test_efd.c
@@ -33,6 +33,7 @@ test_efd(void)
static unsigned int test_socket_id;
/* 5-tuple key type */
+__rte_msvc_pack
struct flow_key {
uint32_t ip_src;
uint32_t ip_dst;
diff --git a/app/test/test_hash.c b/app/test/test_hash.c
index 65b9cad93c..9b621ec6c3 100644
--- a/app/test/test_hash.c
+++ b/app/test/test_hash.c
@@ -79,6 +79,7 @@ static uint32_t hashtest_key_lens[] = {0, 2, 4, 5, 6, 7, 8, 10, 11, 15, 16, 21,
* Should be packed to avoid holes with potentially
* undefined content in the middle.
*/
+__rte_msvc_pack
struct flow_key {
uint32_t ip_src;
uint32_t ip_dst;
diff --git a/app/test/test_member.c b/app/test/test_member.c
index 5a4d2750db..ccd481a3a1 100644
--- a/app/test/test_member.c
+++ b/app/test/test_member.c
@@ -32,6 +32,7 @@ struct rte_member_setsum *setsum_vbf;
struct rte_member_setsum *setsum_sketch;
/* 5-tuple key type */
+__rte_msvc_pack
struct flow_key {
uint32_t ip_src;
uint32_t ip_dst;
--
2.47.0.vfs.0.3
More information about the dev
mailing list