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 27D8BA058A; Wed, 25 Mar 2020 09:12:42 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6CE042BCE; Wed, 25 Mar 2020 09:12:41 +0100 (CET) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 048C51E34 for ; Wed, 25 Mar 2020 09:12:39 +0100 (CET) Received: from Internal Mail-Server by MTLPINE2 (envelope-from dekelp@mellanox.com) with ESMTPS (AES256-SHA encrypted); 25 Mar 2020 10:12:37 +0200 Received: from mtl-vdi-280.wap.labs.mlnx. (mtl-vdi-280.wap.labs.mlnx [10.228.134.250]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 02P8Cb0Z019637; Wed, 25 Mar 2020 10:12:37 +0200 From: Dekel Peled To: orika@mellanox.com, wenzhuo.lu@intel.com, jingjing.wu@intel.com, bernard.iremonger@intel.com Cc: matan@mellanox.com, dev@dpdk.org Date: Wed, 25 Mar 2020 10:12:31 +0200 Message-Id: <849037cfb86ddbce85675606f8a81090044e97e1.1585123614.git.dekelp@mellanox.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <239bc0ae9191ddc12fec65742949710d13185b85.1584346077.git.dekelp@mellanox.com> References: <239bc0ae9191ddc12fec65742949710d13185b85.1584346077.git.dekelp@mellanox.com> Subject: [dpdk-dev] [PATCH v2] app/testpmd: enhance GTP support 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" This patch adds CLI option to enter the v_pt_rsv_flags value for GTP flow pattern item. It also adds GTP as valid item in raw_encap and raw_decap setting. Signed-off-by: Dekel Peled --- v2: remove redundant hton flag. --- app/test-pmd/cmdline_flow.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index a781545..4877ac6 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -170,6 +170,7 @@ enum index { ITEM_FUZZY, ITEM_FUZZY_THRESH, ITEM_GTP, + ITEM_GTP_FLAGS, ITEM_GTP_MSG_TYPE, ITEM_GTP_TEID, ITEM_GTPC, @@ -938,6 +939,7 @@ struct parse_action_priv { }; static const enum index item_gtp[] = { + ITEM_GTP_FLAGS, ITEM_GTP_MSG_TYPE, ITEM_GTP_TEID, ITEM_NEXT, @@ -2347,12 +2349,18 @@ static int comp_set_raw_index(struct context *, const struct token *, .next = NEXT(item_gtp), .call = parse_vc, }, + [ITEM_GTP_FLAGS] = { + .name = "v_pt_rsv_flags", + .help = "GTP flags", + .next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param), + .args = ARGS(ARGS_ENTRY(struct rte_flow_item_gtp, + v_pt_rsv_flags)), + }, [ITEM_GTP_MSG_TYPE] = { .name = "msg_type", .help = "GTP message type", .next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param), - .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp, - msg_type)), + .args = ARGS(ARGS_ENTRY(struct rte_flow_item_gtp, msg_type)), }, [ITEM_GTP_TEID] = { .name = "teid", @@ -6604,6 +6612,9 @@ static int comp_set_raw_index(struct context *, const struct token *, size = sizeof(struct rte_flow_item_ah); proto = 0x33; break; + case RTE_FLOW_ITEM_TYPE_GTP: + size = sizeof(struct rte_flow_item_gtp); + break; case RTE_FLOW_ITEM_TYPE_PFCP: size = sizeof(struct rte_flow_item_pfcp); break; -- 1.8.3.1