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 E6E1BA0562 for ; Tue, 31 Mar 2020 15:38:37 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DC85D2C15; Tue, 31 Mar 2020 15:38:37 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 581901BFC6; Tue, 31 Mar 2020 15:38:36 +0200 (CEST) IronPort-SDR: t51s5xWYdAsoUYQl1yUvdg5wCKKm4RnO37LIEd5VBzzW/I0k7wGof3IArDK6hEJpIkixJ2+d5Y 6fH1WMQZiXfw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2020 06:38:35 -0700 IronPort-SDR: cxT8K19HsPONKDx3Xnh9mJacLsGw9sOwQS6I6+zmi0VuaXUqU/gg3aPTj0XjS+xNYnXv4scpYW pUCcijkuJLcg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,327,1580803200"; d="scan'208";a="422297578" Received: from npg-dpdk-zhangxiao.sh.intel.com ([10.67.110.203]) by orsmga005.jf.intel.com with ESMTP; 31 Mar 2020 06:38:33 -0700 From: Xiao Zhang To: dev@dpdk.org Cc: orika@mellanox.com, qi.z.zhang@intel.com, wei.zhao1@intel.com, Xiao Zhang , stable@dpdk.org Date: Tue, 31 Mar 2020 21:29:40 +0800 Message-Id: <20200331132940.4960-1-xiao.zhang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200327081926.6154-1-xiao.zhang@intel.com> References: <20200327081926.6154-1-xiao.zhang@intel.com> Subject: [dpdk-stable] [v2] app/testpmd: fix PPPOES flow API X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" The command line to create RTE flow for specific proto_id of PPPOES can not work. It was: testpmd> flow create 0 ingress pattern proto_id proto_id [TOKEN]: match PPPoE session protocol identifier testpmd> flow create 0 ingress pattern proto_id proto_id proto_id [TOKEN]: match PPPoE session protocol identifier testpmd> flow create 0 ingress pattern proto_id proto_id proto_id proto_id [TOKEN]: match PPPoE session protocol identifier The proto_id can not be set with previous implementation. This patch is to fix this issue, and change the command line to: testpmd> flow create 0 pattern pppoe_proto_id is xxxx Fixes: 226c6e60c35b ("ethdev: add PPPoE to flow API") Cc: stable@dpdk.org Signed-off-by: Xiao Zhang --- v2 change the command line according to review comments. --- app/test-pmd/cmdline_flow.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index a78154502..7ac01562e 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -1035,7 +1035,6 @@ static const enum index item_pppoes[] = { }; static const enum index item_pppoe_proto_id[] = { - ITEM_PPPOE_PROTO_ID, ITEM_NEXT, ZERO, }; @@ -2641,11 +2640,14 @@ static const struct token token_list[] = { session_id)), }, [ITEM_PPPOE_PROTO_ID] = { - .name = "proto_id", + .name = "pppoe_proto_id", .help = "match PPPoE session protocol identifier", .priv = PRIV_ITEM(PPPOE_PROTO_ID, sizeof(struct rte_flow_item_pppoe_proto_id)), - .next = NEXT(item_pppoe_proto_id), + .next = NEXT(item_pppoe_proto_id, NEXT_ENTRY(UNSIGNED), + item_param), + .args = ARGS(ARGS_ENTRY_HTON + (struct rte_flow_item_pppoe_proto_id, proto_id)), .call = parse_vc, }, [ITEM_HIGIG2] = { -- 2.17.1