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 36654A0562; Mon, 30 Mar 2020 10:29:44 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E25861BFD4; Mon, 30 Mar 2020 10:29:42 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 7DFF42C15 for ; Mon, 30 Mar 2020 10:29:41 +0200 (CEST) IronPort-SDR: 5Yz7x8pUSn7gC+0Y1+oGkPKeiUDrfnYdwUrVl9RPO6TGcMg17KhyKFbu8kmGm99sR49mDcYWey CBdcJ0wq1f0w== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2020 01:29:40 -0700 IronPort-SDR: VJpJk1e1qKGJYXoO9sJ59ctPh2rQD8DGnZZWGBB81cnp9R4R7u3jhhmo8u3nfYqV5cd9iURa9V LrXFSR96IJPA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,323,1580803200"; d="scan'208";a="448192517" Received: from jguo15x-mobl.ccr.corp.intel.com (HELO [10.67.68.135]) ([10.67.68.135]) by fmsmga005.fm.intel.com with ESMTP; 30 Mar 2020 01:29:38 -0700 To: Ori Kam , "xiaolong.ye@intel.com" , "qi.z.zhang@intel.com" Cc: "dev@dpdk.org" , "jingjing.wu@intel.com" , "yahui.cao@intel.com" , "simei.su@intel.com" References: <20200318170401.7938-5-jia.guo@intel.com> <20200326164039.36687-1-jia.guo@intel.com> <20200326164039.36687-4-jia.guo@intel.com> From: Jeff Guo Message-ID: Date: Mon, 30 Mar 2020 16:29:38 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Subject: Re: [dpdk-dev] [dpdk-dev v2 3/4] app/testpmd: support GTP PDU type 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" hi, orika On 3/29/2020 4:44 PM, Ori Kam wrote: > Hi Jeff, > > >> -----Original Message----- >> From: dev On Behalf Of Jeff Guo >> Sent: Thursday, March 26, 2020 6:41 PM >> To: xiaolong.ye@intel.com; qi.z.zhang@intel.com >> Cc: dev@dpdk.org; jingjing.wu@intel.com; yahui.cao@intel.com; >> simei.su@intel.com; jia.guo@intel.com >> Subject: [dpdk-dev] [dpdk-dev v2 3/4] app/testpmd: support GTP PDU type >> >> Add gtp pdu type configure in the cmdline. > Why not use ITEM_GTP_PSC_PDU? I guess you mean ITEM_GTP_PSC_PDU_T, rihgt? We know  we have got ITEM_GTP_PSC_QFI/ITEM_GTP_PSC_PDU_T but not define the spec for them, so what i use is add the spec into the ITEM_GTP_PSC_PDU_T to let the pdu type to be configured. >> Signed-off-by: Jeff Guo >> --- >> v1: >> no change >> --- >> app/test-pmd/cmdline_flow.c | 11 ++++++++++- >> 1 file changed, 10 insertions(+), 1 deletion(-) >> >> diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c >> index a78154502..c1bd02919 100644 >> --- a/app/test-pmd/cmdline_flow.c >> +++ b/app/test-pmd/cmdline_flow.c >> @@ -49,6 +49,7 @@ enum index { >> PORT_ID, >> GROUP_ID, >> PRIORITY_LEVEL, >> + GTP_PSC_PDU_T, >> >> /* Top-level command. */ >> SET, >> @@ -1626,6 +1627,13 @@ static const struct token token_list[] = { >> .call = parse_int, >> .comp = comp_none, >> }, >> + [GTP_PSC_PDU_T] = { >> + .name = "{GTPU pdu type}", >> + .type = "INTEGER", >> + .help = "gtpu pdu uplink/downlink identifier", >> + .call = parse_int, >> + .comp = comp_none, >> + }, > Why is this created at this level? > This looks like is should be written totally differently. As i said above,  the item we got but spec or say next token still need to be added, do you mean it should not in the group of Common tokens? If so, let me think about that, and please explicit your proposal if you already have one. >> /* Top-level command. */ >> [FLOW] = { >> .name = "flow", >> @@ -2615,7 +2623,8 @@ static const struct token token_list[] = { >> [ITEM_GTP_PSC_PDU_T] = { >> .name = "pdu_t", >> .help = "PDU type", >> - .next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED), >> item_param), >> + .next = NEXT(item_gtp_psc, NEXT_ENTRY(GTP_PSC_PDU_T), >> + item_param), >> .args = ARGS(ARGS_ENTRY_HTON(struct >> rte_flow_item_gtp_psc, >> pdu_type)), >> }, >> -- >> 2.20.1