From: Shachar Beiser Date: Tue, 16 Jan 2018 09:17:51 +0000 (+0200) Subject: net: add IPv6 header fields macros X-Git-Tag: spdx-start~76 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;ds=sidebyside;h=9b20c6e9028eb903ffc5e49cbf5c63e25a7c568f;p=dpdk.git net: add IPv6 header fields macros Support IPv6 header vtc_flow fields : tc , flow_label Signed-off-by: Shachar Beiser Acked-by: Olivier Matz --- diff --git a/lib/librte_net/rte_ip.h b/lib/librte_net/rte_ip.h index 9a62ff6670..f32684c661 100644 --- a/lib/librte_net/rte_ip.h +++ b/lib/librte_net/rte_ip.h @@ -344,6 +344,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. *