From 854c1333b53f42767b1f5bc731d139d8f675574c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Morten=20Br=C3=B8rup?= Date: Mon, 1 Jul 2019 15:38:05 +0200 Subject: [PATCH] net: fix definition of IPv6 traffic class mask MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit IPv6 header TC field is 8 bits, not 4. Fixes: 9b20c6e9028e ("net: add IPv6 header fields macros") Cc: stable@dpdk.org Signed-off-by: Morten Brørup Acked-by: Olivier Matz --- lib/librte_net/rte_ip.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_net/rte_ip.h b/lib/librte_net/rte_ip.h index ae3b7e7302..059ec80c2d 100644 --- a/lib/librte_net/rte_ip.h +++ b/lib/librte_net/rte_ip.h @@ -355,7 +355,7 @@ struct rte_ipv6_hdr { #define RTE_IPV6_HDR_FL_SHIFT 0 #define RTE_IPV6_HDR_TC_SHIFT 20 #define RTE_IPV6_HDR_FL_MASK ((1u << RTE_IPV6_HDR_TC_SHIFT) - 1) -#define RTE_IPV6_HDR_TC_MASK (0xf << RTE_IPV6_HDR_TC_SHIFT) +#define RTE_IPV6_HDR_TC_MASK (0xff << RTE_IPV6_HDR_TC_SHIFT) /** * Process the pseudo-header checksum of an IPv6 header. -- 2.20.1