[dpdk-stable] [PATCH v2 66/67] net: add IPv6 header fields macros
Yongseok Koh
yskoh at mellanox.com
Tue Jun 5 02:41:38 CEST 2018
From: Shachar Beiser <shacharbe at mellanox.com>
[ upstream commit 9b20c6e9028eb903ffc5e49cbf5c63e25a7c568f ]
Support IPv6 header vtc_flow fields : tc , flow_label
Signed-off-by: Shachar Beiser <shacharbe at mellanox.com>
Acked-by: Olivier Matz <olivier.matz at 6wind.com>
---
lib/librte_net/rte_ip.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lib/librte_net/rte_ip.h b/lib/librte_net/rte_ip.h
index 73ec398fc..23468cb99 100644
--- a/lib/librte_net/rte_ip.h
+++ b/lib/librte_net/rte_ip.h
@@ -406,6 +406,12 @@ struct ipv6_hdr {
uint8_t dst_addr[16]; /**< IP address of destination host(s). */
} __attribute__((__packed__));
+/* IPv6 vtc_flow: IPv / TC / flow_label */
+#define IPV6_HDR_FL_SHIFT 0
+#define IPV6_HDR_TC_SHIFT 20
+#define IPV6_HDR_FL_MASK ((1u << IPV6_HDR_TC_SHIFT) - 1)
+#define IPV6_HDR_TC_MASK (0xf << IPV6_HDR_TC_SHIFT)
+
/**
* Process the pseudo-header checksum of an IPv6 header.
*
--
2.11.0
More information about the stable
mailing list