From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 09F3BA04B1; Thu, 27 Aug 2020 13:40:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5FD0B1C1B9; Thu, 27 Aug 2020 13:40:58 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id DC7991C1B1 for ; Thu, 27 Aug 2020 13:40:55 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 07RBPnPL032646 for ; Thu, 27 Aug 2020 04:40:55 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=G6l9GtuB5GXxiQ4fdm8npHv8o4wkkoJPJrb+aLMNvl0=; b=aNO+syxA9PCrprsVVmQ8FlhJ2CI07w+IF6+K1q2ksya2ZOV+cS0ElnMD0XzDslWDJ3Me xIVuPBnQ2PN80aLzuhoKd3AyR8LDqVl9EFcSk0mebIRYveARf7Iwm8QEb1UUo1Nvmd/s 8CmkpTBth/ikns/ccRRwJ20Gvve2IRmVBJi7NfzrMTwUhBZG3ydez2qsm72NbyAUjzsD rkC8NX1Ea2NtuO8vI9pwsVXdiE0i1Te5C5sqLyCUOXNvc7r14SuJJcgxGZ+cwqpyEAcB D4O/D5ExsTIu2j5QBrEwfsZkYl3Biw4wfaiqjTPjXRh33JByBM/fFmkgP2aXuASvV8G+ gA== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0a-0016f401.pphosted.com with ESMTP id 3330qpxhf1-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Thu, 27 Aug 2020 04:40:54 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 27 Aug 2020 04:40:52 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 27 Aug 2020 04:40:51 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 27 Aug 2020 04:40:51 -0700 Received: from localhost.localdomain (unknown [10.28.34.15]) by maili.marvell.com (Postfix) with ESMTP id DE04D3F703F; Thu, 27 Aug 2020 04:40:49 -0700 (PDT) From: To: Jerin Jacob , Nithin Dabilpuram , Kiran Kumar K CC: Date: Thu, 27 Aug 2020 17:10:41 +0530 Message-ID: <20200827114042.475771-1-kirankumark@marvell.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-08-27_06:2020-08-27, 2020-08-27 signatures=0 Subject: [dpdk-dev] [PATCH] net/octeontx2: move ESP parsing to LE layer X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Kiran Kumar K Add support to parse NAT-T-ESP by moving the ESP parsing to LE. Signed-off-by: Kiran Kumar K --- drivers/common/octeontx2/hw/otx2_npc.h | 2 +- drivers/net/octeontx2/otx2_flow_parse.c | 10 +++++----- drivers/net/octeontx2/otx2_lookup.c | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/common/octeontx2/hw/otx2_npc.h b/drivers/common/octeontx2/hw/otx2_npc.h index efde1e214..45e60dfd5 100644 --- a/drivers/common/octeontx2/hw/otx2_npc.h +++ b/drivers/common/octeontx2/hw/otx2_npc.h @@ -225,7 +225,6 @@ enum npc_kpu_ld_ltype { NPC_LT_LD_SCTP, NPC_LT_LD_ICMP6, NPC_LT_LD_IGMP = 8, - NPC_LT_LD_ESP, NPC_LT_LD_AH, NPC_LT_LD_GRE, NPC_LT_LD_NVGRE, @@ -237,6 +236,7 @@ enum npc_kpu_ld_ltype { enum npc_kpu_le_ltype { NPC_LT_LE_VXLAN = 1, NPC_LT_LE_GENEVE, + NPC_LT_LE_ESP, NPC_LT_LE_GTPU = 4, NPC_LT_LE_VXLANGPE, NPC_LT_LE_GTPC, diff --git a/drivers/net/octeontx2/otx2_flow_parse.c b/drivers/net/octeontx2/otx2_flow_parse.c index 2d9a5857c..e918574df 100644 --- a/drivers/net/octeontx2/otx2_flow_parse.c +++ b/drivers/net/octeontx2/otx2_flow_parse.c @@ -245,6 +245,11 @@ otx2_flow_parse_le(struct otx2_parse_state *pst) info.len = sizeof(struct rte_flow_item_vxlan); lt = NPC_LT_LE_VXLAN; break; + case RTE_FLOW_ITEM_TYPE_ESP: + lt = NPC_LT_LE_ESP; + info.def_mask = &rte_flow_item_esp_mask; + info.len = sizeof(struct rte_flow_item_esp); + break; case RTE_FLOW_ITEM_TYPE_GTPC: lflags = NPC_F_UDP_GTP_GTPC; info.def_mask = &rte_flow_item_gtp_mask; @@ -441,11 +446,6 @@ otx2_flow_parse_ld(struct otx2_parse_state *pst) info.def_mask = &rte_flow_item_sctp_mask; info.len = sizeof(struct rte_flow_item_sctp); break; - case RTE_FLOW_ITEM_TYPE_ESP: - lt = NPC_LT_LD_ESP; - info.def_mask = &rte_flow_item_esp_mask; - info.len = sizeof(struct rte_flow_item_esp); - break; case RTE_FLOW_ITEM_TYPE_GRE: lt = NPC_LT_LD_GRE; info.def_mask = &rte_flow_item_gre_mask; diff --git a/drivers/net/octeontx2/otx2_lookup.c b/drivers/net/octeontx2/otx2_lookup.c index 10944bc17..14ea1cf79 100644 --- a/drivers/net/octeontx2/otx2_lookup.c +++ b/drivers/net/octeontx2/otx2_lookup.c @@ -169,15 +169,15 @@ nix_create_non_tunnel_ptype_array(uint16_t *ptype) case NPC_LT_LD_NVGRE: val |= RTE_PTYPE_TUNNEL_NVGRE; break; - case NPC_LT_LD_ESP: - val |= RTE_PTYPE_TUNNEL_ESP; - break; } switch (le) { case NPC_LT_LE_VXLAN: val |= RTE_PTYPE_TUNNEL_VXLAN; break; + case NPC_LT_LE_ESP: + val |= RTE_PTYPE_TUNNEL_ESP; + break; case NPC_LT_LE_VXLANGPE: val |= RTE_PTYPE_TUNNEL_VXLAN_GPE; break; -- 2.25.1