From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8E32C48BCD for ; Tue, 8 Jun 2021 10:38:37 +0000 (UTC) Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by mail.kernel.org (Postfix) with ESMTP id 468E161263 for ; Tue, 8 Jun 2021 10:38:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 468E161263 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 54CB34067A; Tue, 8 Jun 2021 12:38:36 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 9B7AA4013F for ; Tue, 8 Jun 2021 12:38:34 +0200 (CEST) IronPort-SDR: RyVVbe+sPIHkM+8dwrbzq4d6lMifRHGP5DHxrKp1K3ngV9SFSECORwLvaD0GA1mi+7pBYvPmAk 8EAKEJvlXi8g== X-IronPort-AV: E=McAfee;i="6200,9189,10008"; a="265970202" X-IronPort-AV: E=Sophos;i="5.83,257,1616482800"; d="scan'208";a="265970202" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2021 03:38:33 -0700 IronPort-SDR: 0zF/hEsHTIOFi4yCHlmOV6nc0RTbKe/57sah1XXI7NqD7yVV3cNXtUhncocftV2pu9Nxs3kEIF UMnrtlOX5Hkg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,257,1616482800"; d="scan'208";a="447850249" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by orsmga008.jf.intel.com with ESMTP; 08 Jun 2021 03:38:33 -0700 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Tue, 8 Jun 2021 03:38:32 -0700 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Tue, 8 Jun 2021 03:38:31 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4 via Frontend Transport; Tue, 8 Jun 2021 03:38:31 -0700 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (104.47.74.43) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.4; Tue, 8 Jun 2021 03:38:31 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gOjxPH0T+Oweq6lg3Fx0v/G+c27yiwXnMLlpC5R334X1ciGnfuWMYC7seqYfY0olJw76OUg2+Xc87gjh34XRYLEOXbSQyADkrb941VXTP2GnBW4HD5mZz+uOX7Q+kHIUuZZKqB0QNqFi288dJbHJy/Ut2qxgc5Jb7JDQAPop83N/4dEhAIQO+K63+EYMWu8wr1stclh9vG6xfNXjPh1DeMJjfi9GAiVHu7/ZLoBccnEU0g4Hfk4yzs5p+pyinCj11k0AAiNodrKen6zsqdFl7j0LP8oStjcNFRlv2Wa4Z1yQTSFtJ7e7PQaZswzxubz2+kVjkEAnvhBYLx2VfF+GtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=r8XGqU1EnFRGaa07c65injLE2hyNnL+4lv9gt7ket+4=; b=EtfnwH18hprUz6m0kiwfi9QGw//oyABqWLq5iPH52Q3lk7ypcj+bG4zwylEU/rZesKeP5gbPJldbR9Jh3qrU0DFA7TH2T8nZfXwk/dwquKGsZmls2YIQzHmjUXB6++sbdcZ73zsbcz5H/zYEdA14m57vbOdH5GVJK1vlWMHWO0kS6AU3nSzAiNiUopXKMurg7WZpSBWCfCYbErzLubCz6ckG1Dw+6kmYX/3N2sqzU1h3jBu4LPDhC5EJbQryQcgv/7w+P9iwp2gFMN0SJZHy+VqPSof70aJSDxGH/PSNpVk+lmzhxj7YIPHwMtLRDPw1pSS41MSOKJBLHyLeja+Y5A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=r8XGqU1EnFRGaa07c65injLE2hyNnL+4lv9gt7ket+4=; b=iP2QRFH5v8JzjG/TqhLcPgJMws2f9fqLj9Jup0G8tYYivt4kUiEdWXjU77hgJAlURpMogjlMxV44aVZ9oqOCYMS3gAtS7GE8kNDKtcydt1Zmd/KCsLs7mCGRffExf+QffDXVc2C188C3mDGYpMzCLxhUxZl7SkfVgGOCywHq9gQ= Received: from DM6PR11MB2796.namprd11.prod.outlook.com (2603:10b6:5:c8::23) by DM4PR11MB5245.namprd11.prod.outlook.com (2603:10b6:5:388::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4195.23; Tue, 8 Jun 2021 10:38:30 +0000 Received: from DM6PR11MB2796.namprd11.prod.outlook.com ([fe80::d099:834d:f5ad:39c9]) by DM6PR11MB2796.namprd11.prod.outlook.com ([fe80::d099:834d:f5ad:39c9%3]) with mapi id 15.20.4173.037; Tue, 8 Jun 2021 10:38:30 +0000 From: "Dumitrescu, Cristian" To: Bing Zhao , Matan Azrad , "Slava Ovsiienko" , Ori Kam , Li Zhang CC: NBU-Contact-Thomas Monjalon , "Yigit, Ferruh" , "andrew.rybchenko@oktetlabs.ru" , "dev@dpdk.org" Thread-Topic: [RFC] Support metering policy for yellow color in mlx5 PMD Thread-Index: AddXsruDshSQxwzPSReXsI6dX/mJSAEnoESw Date: Tue, 8 Jun 2021 10:38:29 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.5.1.3 dlp-reaction: no-action dlp-product: dlpe-windows authentication-results: nvidia.com; dkim=none (message not signed) header.d=none;nvidia.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [64.43.28.196] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 53f6142e-7fa7-41ef-afc1-08d92a698e86 x-ms-traffictypediagnostic: DM4PR11MB5245: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: TUKpsJ1RBOHlz2r3Cv7mB77lOZwnpbFYQiq4wKrgywmJbFmgkLdKSl1ko8vzFjhu6IPhF0uuLt6EYyPtjDq078xBLjaSGBH4S7J59aR0f3ifwgBoBuCbHd1A0yebK4RrLOF3dYeTlhbc9xUYof2dcFDz86Fazy6d0LZrg+i6XyBEtihKlC+mekFHsGLFFTFK+AaAqN1DQm26TWGGRdC5gEnlUepzd7tLr+2x7N0VDogjiu13etnkVnYRT8BO3G95e/9GXGiuyjm3Ohx5ueWNGSgAGgxTlfFwKcEO2J6bwQR+jRmYBONpoBTGWyjcD38S1xYPW06u9IBivs4Yj8ZnwfgpE74IScul79u0aPGxIybi7ZWczuxaYDwIg431U5M42hIwQzcEVXqAivCloNOIeZgcGK2+0cfdaDWf0jft7STGEF1EpJrf7VR5JZ3lsypAiySsY3gKYGVKqUMCLU5Ax4taoYHrC3n1nZK6wTm16Ye3zXWWnKZEGALfJJRJjHFvhOb0pZXZokDKE3M8bzcU6Ufw0Ugr6Mi7NG6aMp93iBkGJhVDR7yEetnTSEL50YJZ6QwqY4K7zpdHj4fjoQMxCo41m0BS/CEk20qleNaEEYc= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB2796.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(136003)(396003)(366004)(346002)(376002)(39860400002)(76116006)(8936002)(66946007)(53546011)(26005)(8676002)(6506007)(186003)(52536014)(64756008)(66446008)(83380400001)(66476007)(4326008)(38100700002)(316002)(5660300002)(122000001)(71200400001)(54906003)(110136005)(86362001)(55016002)(9686003)(478600001)(7696005)(33656002)(2906002)(66556008); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?9YLSmtTYIu+qXKfHsHriBer8jLbDJlaeJghDFxCJG8ztinE/N4EkjMZReFUO?= =?us-ascii?Q?rnWle38IjQ/ZsROw2/+9acna2uQCvdbSRiHZ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xFnqJ7kTowW2/0n1hiK+N/GxbPMn90WFCRlTWS/KKkgyOBSPzjMi6?= =?us-ascii?Q?Ap6Ff72zXrxFanSfpg99e99DVmjsNTF60D6OyJoU9u77xC77chkkXGdNlLCt?= =?us-ascii?Q?0Wra2ITN5M7l8+x/8swKJLZfZWkyh0cXRXG6Wos2jS65Cr4OWTzrsouj9PJj?= =?us-ascii?Q?G6I8a9LlEhImvUlvs2HNxemYRovDwTTIegKYqv6oFst/E85z5pGJ0mwOzx4/?= =?us-ascii?Q?8jmGsOHDs8BZhetZtXCU4yCdU1aOEqIQ6cfAQjRcww2TzC8x7B3MI8G3jnG9?= =?us-ascii?Q?pZK6CXqHrzQFM4cbVR2aS2tBWGAc6kajgQVPvXPJRoe5bYCnitCdVlwKfCpA?= =?us-ascii?Q?ku0=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB2796.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 53f6142e-7fa7-41ef-afc1-08d92a698e86 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Jun 2021 10:38:29.9340 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: jBxd6GnKarWOAjcJOFmtJJBgZzRZwiCu/C2yKLMUrOOo4/WGTtfAeljO4d9CxI+W+vlLhF9mqqf5KWBkLSYvdP6Pe6tQoZ9he2xRqqwjOCs= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB5245 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [RFC] Support metering policy for yellow color in mlx5 PMD 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" Hi Bing, I am not entirely sure what your question is; if your question is: can I us= e all the features of the API, then the answer is definitely YES :). > -----Original Message----- > From: Bing Zhao > Sent: Wednesday, June 2, 2021 2:25 PM > To: Matan Azrad ; Slava Ovsiienko > ; Ori Kam ; Li Zhang > > Cc: Dumitrescu, Cristian ; NBU-Contact- > Thomas Monjalon ; Yigit, Ferruh > ; andrew.rybchenko@oktetlabs.ru; dev@dpdk.org > Subject: [RFC] Support metering policy for yellow color in mlx5 PMD >=20 > The current API of metering can support different policies for different > colors, as described in the header file "rte_mtr.h". >=20 > /** > * Meter policy > */ > struct rte_mtr_meter_policy_params { > /** > * Policy action list per color. > * actions[i] potentially represents a chain of rte_flow a= ctions > * terminated by the END action, exactly as specified by t= he rte_flow > * API for the flow definition, and not just a single acti= on. > */ > const struct rte_flow_action *actions[RTE_COLORS]; > }; >=20 > In the real-life, when doing QoS or traffic shaping with metering, there = is no > restriction of the packets handling for different colors. After the meter= ing, > the packet will be marked with different colors and it is the application= 's > responsibility to decide the next step of handling packets with different > colors. The policies of different colors can be either the same or differ= ent. >=20 > In the current implementation of mlx5 PMD, when adding a meter policy, > only > the actions list for GREEN was supported, like RSS, queue, mark, etc., bu= t no > support for YELLOW. The support of policy actions of YELLOW color is adde= d > to > provide better flexibility. >=20 > 1. The actions to be supported are as same as those for GREEN, includin= g > terminating and non-terminating actions. > 2. The policies of GREEN and YELLOW colors are independent. > 3. When RSS is used for both GREEN and YELLOW in one policy parameter, > except the queues list, all the other configurations of RSS should b= e > the same, like level, hash fields, and so on. > 4. No change for the RED color is needed, and the default behavior shou= ld > still be the "drop". If your HW supports it, why hardcode the RED action to drop and not allow p= eople to set up any set of actions they want (as long as supported by the H= W) for the RED packets? Yes, drop might be a typical action that some users will set for the RED pa= ckets, but I don't see any reason to have this restricted by the driver (un= less the drop action is the only action supported by the HW for the RED pac= kets). >=20 > The testpmd command line example is like below: >=20 > add port meter profile srtcm_rfc2697 0 24 65536 1024 0 0 > add port meter policy 0 1 g_actions rss queues 0 end types udp end / end > y_actions rss queues 1 end types udp end / end r_actions drop / end > create port meter 0 1 24 1 yes 0xffff 1 0 > ... >=20 > The actions list configuration for different colors in testpmd CLI was > already supported. There is no major change needed for the testpmd CLI. >=20 > Signed-off-by: Bing Zhao Regards, Cristian