From 5b1f399c5cacc11ea2bab7bc68a06bcfa378279d Mon Sep 17 00:00:00 2001 From: Flavia Musatescu Date: Wed, 6 Nov 2019 14:49:41 +0000 Subject: [PATCH] net: fix IPv4 IHL and VHL define Fix the RTE_IPV4_VHL_DEF macro that represents the value for the IPv4 VHL and Minimum IHL header fields according to rfc791. Fixes: 2318d8d54565 ("net: define IPv4 IHL and VHL") Cc: stable@dpdk.org Reported-by: David Harton Signed-off-by: Flavia Musatescu Reviewed-by: Ferruh Yigit --- 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 731ee4f213..e3300fd0fe 100644 --- a/lib/librte_net/rte_ip.h +++ b/lib/librte_net/rte_ip.h @@ -101,7 +101,7 @@ struct rte_ipv4_hdr { /* IPv4 default fields values */ #define RTE_IPV4_MIN_IHL (0x5) -#define RTE_IPV4_VHL_DEF (IPVERSION | RTE_IPV4_MIN_IHL) +#define RTE_IPV4_VHL_DEF ((IPVERSION << 4) | RTE_IPV4_MIN_IHL) /** * @internal Calculate a sum of all words in the buffer. -- 2.20.1