From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id ABDC5A0C47; Tue, 12 Oct 2021 12:25:38 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DDC374115B; Tue, 12 Oct 2021 12:25:33 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id D405E41157 for ; Tue, 12 Oct 2021 12:25:30 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10134"; a="214251239" X-IronPort-AV: E=Sophos;i="5.85,367,1624345200"; d="scan'208";a="214251239" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Oct 2021 03:25:30 -0700 X-IronPort-AV: E=Sophos;i="5.85,367,1624345200"; d="scan'208";a="480293991" Received: from dpdk.cd.intel.com ([10.240.178.133]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Oct 2021 03:25:27 -0700 From: Jie Wang To: dev@dpdk.org Cc: ferruh.yigit@intel.com, thomas@monjalon.net, andrew.rybchenko@oktetlabs.ru, xiaoyun.li@intel.com, stevex.yang@intel.com, jingjing.wu@intel.com, beilei.xing@intel.com, wenjun1.wu@intel.com, Jie Wang Date: Tue, 12 Oct 2021 18:25:07 +0800 Message-Id: <20211012102508.275790-3-jie1x.wang@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211012102508.275790-1-jie1x.wang@intel.com> References: <20210924151705.287571-1-jie1x.wang@intel.com> <20211012102508.275790-1-jie1x.wang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 2/3] 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 bb22294dd3..3c9bcabd97 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; } -- 2.25.1