DPDK patches and discussions
 help / color / mirror / Atom feed
From: Gagandeep Singh <g.singh@nxp.com>
To: dev@dpdk.org
Cc: Gagandeep Singh <g.singh@nxp.com>
Subject: [PATCH 3/4] net/dpaa2: support ESP in packet type parsing
Date: Fri, 22 Apr 2022 10:27:28 +0530	[thread overview]
Message-ID: <20220422045729.3320637-3-g.singh@nxp.com> (raw)
In-Reply-To: <20220422045729.3320637-1-g.singh@nxp.com>

This patch supports ESP packet type in packet parsing.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
---
 drivers/net/dpaa2/dpaa2_rxtx.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c
index d536352895..5ebce2b4f4 100644
--- a/drivers/net/dpaa2/dpaa2_rxtx.c
+++ b/drivers/net/dpaa2/dpaa2_rxtx.c
@@ -179,6 +179,9 @@ dpaa2_dev_rx_parse_slow(struct rte_mbuf *mbuf,
 		if (BIT_ISSET_AT_POS(annotation->word4, L3_IP_1_OPT_PRESENT |
 			L3_IP_N_OPT_PRESENT))
 			pkt_type |= RTE_PTYPE_L3_IPV4_EXT;
+		if (BIT_ISSET_AT_POS(annotation->word4, L3_PROTO_IPSEC_ESP_PRESENT |
+					L3_PROTO_ESP_PRESENT))
+			pkt_type |= RTE_PTYPE_TUNNEL_ESP;
 
 	} else if (BIT_ISSET_AT_POS(annotation->word4, L3_IPV6_1_PRESENT |
 		  L3_IPV6_N_PRESENT)) {
@@ -186,6 +189,9 @@ dpaa2_dev_rx_parse_slow(struct rte_mbuf *mbuf,
 		if (BIT_ISSET_AT_POS(annotation->word4, L3_IP_1_OPT_PRESENT |
 		    L3_IP_N_OPT_PRESENT))
 			pkt_type |= RTE_PTYPE_L3_IPV6_EXT;
+		if (BIT_ISSET_AT_POS(annotation->word4, L3_PROTO_IPSEC_ESP_PRESENT |
+					L3_PROTO_ESP_PRESENT))
+			pkt_type |= RTE_PTYPE_TUNNEL_ESP;
 	} else {
 		goto parse_done;
 	}
-- 
2.25.1


  parent reply	other threads:[~2022-04-22  4:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-22  4:57 [PATCH 1/4] net/dpaa2: update mc to 10.32 Gagandeep Singh
2022-04-22  4:57 ` [PATCH 2/4] net/dpaa2: support mempool debug Gagandeep Singh
2022-04-22  4:57 ` Gagandeep Singh [this message]
2022-04-22  4:57 ` [PATCH 4/4] net/dpaa: fix ethernet event queue de-attach Gagandeep Singh
2022-05-10 12:51 ` [PATCH 1/4] net/dpaa2: update mc to 10.32 Ferruh Yigit
2022-05-10 12:53   ` Hemant Agrawal
2022-05-10 16:33 ` Ferruh Yigit

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=20220422045729.3320637-3-g.singh@nxp.com \
    --to=g.singh@nxp.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).