DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] lib/net: Add ICMP support to rte_net_get_ptype()
@ 2025-10-09 15:27 Eimear Morrissey
  0 siblings, 0 replies; only message in thread
From: Eimear Morrissey @ 2025-10-09 15:27 UTC (permalink / raw)
  To: dev

Set RTE_PTYPE_L4_ICMP for ICMP packets.

Signed-off-by: Eimear Morrissey <eimear.morrissey@huawei.com>
---
 lib/net/rte_net.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/net/rte_net.c b/lib/net/rte_net.c
index be24690fdf..eb205ca1b1 100644
--- a/lib/net/rte_net.c
+++ b/lib/net/rte_net.c
@@ -10,6 +10,7 @@
 #include <rte_byteorder.h>
 #include <rte_ether.h>
 #include <rte_ip.h>
+#include <rte_icmp.h>
 #include <rte_tcp.h>
 #include <rte_udp.h>
 #include <rte_sctp.h>
@@ -63,6 +64,7 @@ static uint32_t
 ptype_l4(uint8_t proto)
 {
 	static const uint32_t ptype_l4_proto[256] = {
+		[IPPROTO_ICMP] = RTE_PTYPE_L4_ICMP,
 		[IPPROTO_UDP] = RTE_PTYPE_L4_UDP,
 		[IPPROTO_TCP] = RTE_PTYPE_L4_TCP,
 		[IPPROTO_SCTP] = RTE_PTYPE_L4_SCTP,
@@ -120,6 +122,7 @@ static uint32_t
 ptype_inner_l4(uint8_t proto)
 {
 	static const uint32_t ptype_inner_l4_proto[256] = {
+		[IPPROTO_ICMP] = RTE_PTYPE_INNER_L4_ICMP,
 		[IPPROTO_UDP] = RTE_PTYPE_INNER_L4_UDP,
 		[IPPROTO_TCP] = RTE_PTYPE_INNER_L4_TCP,
 		[IPPROTO_SCTP] = RTE_PTYPE_INNER_L4_SCTP,
-- 
2.35.3


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-10-10  7:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-09 15:27 [PATCH] lib/net: Add ICMP support to rte_net_get_ptype() Eimear Morrissey

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).