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 11A58A0C43; Wed, 12 May 2021 13:41:03 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C3810410DB; Wed, 12 May 2021 13:41:02 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 3F06E4003F for ; Wed, 12 May 2021 13:41:01 +0200 (CEST) IronPort-SDR: gk7hAw2UBSyOaSwvdG4axa4R0y+v+4Dtrfq/2OtFmFQN/kj8M6SVtxf1lgnCC46C7kaDtkyofp FJyWkYvo+tlA== X-IronPort-AV: E=McAfee;i="6200,9189,9981"; a="179275134" X-IronPort-AV: E=Sophos;i="5.82,293,1613462400"; d="scan'208";a="179275134" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2021 04:40:57 -0700 IronPort-SDR: UcZW4Qk4N+eBgxR4r5Esv5qYzbr3OZ1w6/gCi6mBWycyxGB3hzeXBp64DriE0QvfC7SOiZFsJh vC1oSDKiCbRw== X-IronPort-AV: E=Sophos;i="5.82,293,1613462400"; d="scan'208";a="609890835" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.210.216]) ([10.213.210.216]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2021 04:40:54 -0700 To: Haifei Luo , matan@nvidia.com, orika@nvidia.com, viacheslavo@nvidia.com, Xiaoyun Li Cc: dev@dpdk.org, thomas@monjalon.net, rasland@nvidia.com References: <20210428141015.25728-1-haifeil@nvidia.com> <20210512104933.27999-1-haifeil@nvidia.com> From: Ferruh Yigit X-User: ferruhy Message-ID: <99136e0b-63ec-928c-59c7-520c004d5316@intel.com> Date: Wed, 12 May 2021 12:40:50 +0100 MIME-Version: 1.0 In-Reply-To: <20210512104933.27999-1-haifeil@nvidia.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v4] app/testpmd: add CLI for action meter color 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" On 5/12/2021 11:49 AM, Haifei Luo wrote: > Currently action RTE_FLOW_ACTION_TYPE_METER_COLOR is defined. > Add the CLI for this aciton: color type (types) > There are three types: green, yellow and red. > > Example for the new policy meter CLIs: > add port meter policy 0 1 g_actions color type green / end y_actions > color type yellow / end r_actions color type red / end > > In the above command, the action type is RTE_FLOW_ACTION_TYPE_METER_COLOR, > the meter policy action list: green -> green, yellow -> yellow, red -> red. > > V2: rebase the latest code. > V3: update the document. > V4: add sample in the document. > > Signed-off-by: Haifei Luo > Acked-by: Ori Kam testpmd_funcs.rst:5033: WARNING: Block quote ends without a blank line; unexpected unindent. <...> > @@ -5010,6 +5014,25 @@ rules like above for the peer port. > > testpmd> flow indirect_action 0 update 0 action conntrack_update dir / end > > +Sample meter with policy rules > +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > + > +Meter with policy rules can be created by the following commands: > + > +Need to create policy first and actions are set for green/yellow/red colors. > +Create meter with policy id. Create flow with meter id. > + > +Example for policy with meter color action.The purpose is to color the packet > +to reflect the meter color result.The meter policy action list: Space is missing between sentences. > +green -> green, yellow -> yellow, red -> red. > + > +:: > +testpmd> add port meter profile srtcm_rfc2697 0 13 21504 2688 0 0 > +testpmd> add port meter policy 0 1 g_actions color type green / end y_actions color type yellow / end > + r_actions color type red / end > +testpmd> create port meter 0 1 13 1 yes 0xffff 0 0 > +testpmd> flow create 0 priority 0 ingress group 1 pattern eth / end actions meter mtr_id 1 / end > + Gives build warning: testpmd_funcs.rst:5032: WARNING: Unexpected indentation. testpmd_funcs.rst:5033: WARNING: Block quote ends without a blank line; unexpected unindent. Will fix above issues while merging.