]> git.droids-corp.org - dpdk.git/commitdiff
net/dpaa2: support ESP in packet type parsing
authorGagandeep Singh <g.singh@nxp.com>
Fri, 22 Apr 2022 04:57:28 +0000 (10:27 +0530)
committerFerruh Yigit <ferruh.yigit@xilinx.com>
Tue, 10 May 2022 13:43:09 +0000 (15:43 +0200)
This patch supports ESP packet type in packet parsing.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
drivers/net/dpaa2/dpaa2_rxtx.c

index 86059d321c79bc1ddbecdfee49fbf858b2866acc..c17f6ebda9b809996ba4e3bb7f9d234de7d4b0c2 100644 (file)
@@ -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;
        }