* [PATCH] lib/net: Add ICMP support to rte_net_get_ptype()
@ 2025-10-09 15:27 Eimear Morrissey
2025-10-15 17:29 ` Stephen Hemminger
0 siblings, 1 reply; 2+ messages 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] 2+ messages in thread
* Re: [PATCH] lib/net: Add ICMP support to rte_net_get_ptype()
2025-10-09 15:27 [PATCH] lib/net: Add ICMP support to rte_net_get_ptype() Eimear Morrissey
@ 2025-10-15 17:29 ` Stephen Hemminger
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2025-10-15 17:29 UTC (permalink / raw)
To: Eimear Morrissey; +Cc: dev
On Thu, 9 Oct 2025 16:27:40 +0100
Eimear Morrissey <eimear.morrissey@huawei.com> wrote:
> Set RTE_PTYPE_L4_ICMP for ICMP packets.
>
> Signed-off-by: Eimear Morrissey <eimear.morrissey@huawei.com>
Would be good to do ICMP6 as well.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-10-15 17:29 UTC | newest]
Thread overview: 2+ messages (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
2025-10-15 17:29 ` Stephen Hemminger
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).