From patchwork Thu Jun 23 03:42:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Satheesh Paul Antonysamy X-Patchwork-Id: 113299 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 82C6DA0545; Thu, 23 Jun 2022 05:44:49 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 67F924069D; Thu, 23 Jun 2022 05:44:49 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id AB0924069C; Thu, 23 Jun 2022 05:44:48 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 25N2X8DL014435; Wed, 22 Jun 2022 20:44:47 -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=+snJMa8gLFmWilAEN1q4NgZ866w08WcV9EFx8eb1n3w=; b=fCjCaHqdFlawr7gWWGiwqkupzF57PMCdhPt3bi9APb3ENSFkM1NwKB5KJRGRiEtQKmFq eJRiej26GAW3ru4AR6SWgJohZ+I9KhbrSP/9e8Pdj2L8MNVAwaE2maaeiWXNeb172QwT uXDD6AuK1d+ulWvOrIc5k8xekG7b2W2oFTrX8d5UfNIR9hTIkgQz2PpE+OFuq05ZAOYn QSMjesr+g+Qpwd9h7YxBbIgohMG2eGmA7pqI/T2U7qbQnCz7MXFznNA4QyC6kddkop+a 01cjlmh/O51V2ei7TCFjidBcwyyD41oIfzQhMIWSSwi1SSMC7UpbIccjAR5IOTjoQedq +A== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3gvfg587jk-15 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 22 Jun 2022 20:44:47 -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.18; Wed, 22 Jun 2022 20:42:10 -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.18 via Frontend Transport; Wed, 22 Jun 2022 20:42:10 -0700 Received: from satheeshpaullabpc.. (unknown [10.28.34.33]) by maili.marvell.com (Postfix) with ESMTP id A313F3F7099; Wed, 22 Jun 2022 20:42:07 -0700 (PDT) From: To: Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao CC: , Satheesh Paul , Subject: [dpdk-dev] [PATCH] common/cnxk: fix GRE tunnel parsing issue Date: Thu, 23 Jun 2022 09:12:04 +0530 Message-ID: <20220623034204.2195020-1-psatheesh@marvell.com> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: yfDlYjrf4sykuVWmBedWUOg3Vd09Qw8q X-Proofpoint-GUID: yfDlYjrf4sykuVWmBedWUOg3Vd09Qw8q X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-06-23_01,2022-06-22_03,2022-06-22_01 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Satheesh Paul After parsing GRE tunnel, parse subsequent protocols (for example, TCP or UDP) as tunneled versions. Fixes: c34ea71b878 ("common/cnxk: add NPC parsing API") Cc: stable@dpdk.org Signed-off-by: Satheesh Paul Reviewed-by: Kiran Kumar K --- drivers/common/cnxk/roc_npc_parse.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/common/cnxk/roc_npc_parse.c b/drivers/common/cnxk/roc_npc_parse.c index 0748646779..ff00c746d6 100644 --- a/drivers/common/cnxk/roc_npc_parse.c +++ b/drivers/common/cnxk/roc_npc_parse.c @@ -699,11 +699,13 @@ npc_parse_ld(struct npc_parse_state *pst) case ROC_NPC_ITEM_TYPE_GRE: lt = NPC_LT_LD_GRE; info.len = pst->pattern->size; + pst->tunnel = 1; break; case ROC_NPC_ITEM_TYPE_GRE_KEY: lt = NPC_LT_LD_GRE; info.len = pst->pattern->size; info.hw_hdr_len = 4; + pst->tunnel = 1; break; case ROC_NPC_ITEM_TYPE_NVGRE: lt = NPC_LT_LD_NVGRE;