There is currently no structure defined for IPv6 addresses. Introduce
one that is simply a uint8_t array of 16 elements. The idea is to ensure
this structure alignment is 1 so that it can be mapped directly on
unaligned packet memory.

Signed-off-by: Robin Jarry <rja...@redhat.com>
---

Notes:
    v3: move RTE_IPV6_MAX_DEPTH to next commit

 lib/net/rte_ip6.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lib/net/rte_ip6.h b/lib/net/rte_ip6.h
index 9ed737d5eb81..a5ebe065b61e 100644
--- a/lib/net/rte_ip6.h
+++ b/lib/net/rte_ip6.h
@@ -35,6 +35,15 @@
 extern "C" {
 #endif
 
+#define RTE_IPV6_ADDR_SIZE 16
+
+/**
+ * IPv6 Address
+ */
+struct rte_ipv6_addr {
+       uint8_t a[RTE_IPV6_ADDR_SIZE];
+};
+
 /**
  * IPv6 Header
  */
-- 
2.46.2

Reply via email to