From: Eimear Morrissey <eimear.morrissey@huawei.com>
To: <dev@dpdk.org>
Subject: [PATCH] lib/net: Add ICMP support to rte_net_get_ptype()
Date: Thu, 9 Oct 2025 16:27:40 +0100 [thread overview]
Message-ID: <20251009152740.10437-1-eimear.morrissey@huawei.com> (raw)
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
reply other threads:[~2025-10-10 7:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251009152740.10437-1-eimear.morrissey@huawei.com \
--to=eimear.morrissey@huawei.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).