[PATCH v6 2/4] net: add new union into VXLAN header

Rongwei Liu rongweil at nvidia.com
Wed Jun 5 12:21:34 CEST 2024


Add "uint8_t last_rsvd" as union with origin rsvd1.

Signed-off-by: Rongwei Liu <rongweil at nvidia.com>
---
 lib/net/rte_vxlan.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/net/rte_vxlan.h b/lib/net/rte_vxlan.h
index 997fc784fc..57300fb442 100644
--- a/lib/net/rte_vxlan.h
+++ b/lib/net/rte_vxlan.h
@@ -41,7 +41,10 @@ struct rte_vxlan_hdr {
 			uint8_t    flags;    /**< Should be 8 (I flag). */
 			uint8_t    rsvd0[3]; /**< Reserved. */
 			uint8_t    vni[3];   /**< VXLAN identifier. */
-			uint8_t    rsvd1;    /**< Reserved. */
+			union {
+				uint8_t    rsvd1;        /**< Reserved. */
+				uint8_t    last_rsvd;    /**< Reserved. */
+			};
 		};
 	};
 } __rte_packed;
-- 
2.27.0



More information about the dev mailing list