patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] net: fix the IPv4 IHL and VHL define value
@ 2019-11-06 14:49 Flavia Musatescu
  2019-11-06 17:53 ` Ferruh Yigit
  0 siblings, 1 reply; 2+ messages in thread
From: Flavia Musatescu @ 2019-11-06 14:49 UTC (permalink / raw)
  To: dev, Olivier Matz; +Cc: stable, Flavia Musatescu, salehals

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: salehals@mellanox.com
Cc: stable@dpdk.org

Signed-off-by: Flavia Musatescu <flavia.musatescu@intel.com>
---
 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 731ee4f..e3300fd 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.7.4


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-11-06 17:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-06 14:49 [dpdk-stable] [PATCH] net: fix the IPv4 IHL and VHL define value Flavia Musatescu
2019-11-06 17:53 ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).