From patchwork Fri Sep 24 15:17:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jie Wang X-Patchwork-Id: 99541 X-Patchwork-Delegate: ferruh.yigit@amd.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 2DD88A0C43; Fri, 24 Sep 2021 09:20:05 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9EC07412CF; Fri, 24 Sep 2021 09:20:03 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 10919412CF for ; Fri, 24 Sep 2021 09:20:01 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10116"; a="211094926" X-IronPort-AV: E=Sophos;i="5.85,319,1624345200"; d="scan'208";a="211094926" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2021 00:20:01 -0700 X-IronPort-AV: E=Sophos;i="5.85,319,1624345200"; d="scan'208";a="514506142" Received: from dpdk.cd.intel.com ([10.240.178.133]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2021 00:19:58 -0700 From: Jie Wang To: dev@dpdk.org Cc: ferruh.yigit@intel.com, thomas@monjalon.net, andrew.rybchenko@oktetlabs.ru, xiaoyun.li@intel.com, jingjing.wu@intel.com, beilei.xing@intel.com, wenjun1.wu@intel.com, stevex.yang@intel.com, Jie Wang Date: Fri, 24 Sep 2021 23:17:03 +0800 Message-Id: <20210924151705.287571-3-jie1x.wang@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210924151705.287571-1-jie1x.wang@intel.com> References: <20210924151705.287571-1-jie1x.wang@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH 2/4] app/testpmd: support PPPoL2TPv2oUDP RSS Hash 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 Sender: "dev" Add support for test-pmd to parse protocol pattern L2TPv2 and PPP. Signed-off-by: Wenjun Wu Signed-off-by: Jie Wang --- app/test-pmd/cmdline_flow.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index 6cd99bf37f..31016455f2 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -299,6 +299,8 @@ enum index { ITEM_GENEVE_OPT_TYPE, ITEM_GENEVE_OPT_LENGTH, ITEM_GENEVE_OPT_DATA, + ITEM_PPP, + ITEM_L2TPV2, ITEM_INTEGRITY, ITEM_INTEGRITY_LEVEL, ITEM_INTEGRITY_VALUE, @@ -997,6 +999,8 @@ static const enum index next_item[] = { ITEM_AH, ITEM_PFCP, ITEM_ECPRI, + ITEM_PPP, + ITEM_L2TPV2, ITEM_GENEVE_OPT, ITEM_INTEGRITY, ITEM_CONNTRACK, @@ -1368,6 +1372,16 @@ static const enum index item_integrity_lv[] = { ZERO, }; +static const enum index item_ppp[] = { + ITEM_NEXT, + ZERO, +}; + +static const enum index item_l2tpv2[] = { + ITEM_NEXT, + ZERO, +}; + static const enum index next_action[] = { ACTION_END, ACTION_VOID, @@ -3579,6 +3593,20 @@ static const struct token token_list[] = { (sizeof(struct rte_flow_item_geneve_opt), ITEM_GENEVE_OPT_DATA_SIZE)), }, + [ITEM_PPP] = { + .name = "ppp", + .help = "match ppp header", + .priv = PRIV_ITEM(PPP, sizeof(struct rte_flow_item_ppp)), + .next = NEXT(item_ppp), + .call = parse_vc, + }, + [ITEM_L2TPV2] = { + .name = "l2tpv2", + .help = "match l2tpv2 header", + .priv = PRIV_ITEM(L2TPV2, sizeof(struct rte_flow_item_l2tpv2)), + .next = NEXT(item_l2tpv2), + .call = parse_vc, + }, [ITEM_INTEGRITY] = { .name = "integrity", .help = "match packet integrity", @@ -8343,6 +8371,12 @@ flow_item_default_mask(const struct rte_flow_item *item) case RTE_FLOW_ITEM_TYPE_PFCP: mask = &rte_flow_item_pfcp_mask; break; + case RTE_FLOW_ITEM_TYPE_L2TPV2: + mask = &rte_flow_item_l2tpv2_mask; + break; + case RTE_FLOW_ITEM_TYPE_PPP: + mask = &rte_flow_item_ppp_mask; + break; default: break; }