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 AC9C4A0524; Wed, 2 Jun 2021 15:25:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 358DF4069F; Wed, 2 Jun 2021 15:25:26 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2046.outbound.protection.outlook.com [40.107.92.46]) by mails.dpdk.org (Postfix) with ESMTP id CB6B540689 for ; Wed, 2 Jun 2021 15:25:23 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Z/tYnnR1EMEiy0RDyBOF0lKoYfBsOMOVrFMS8xw7e4XmjiC7cNxYZysg7B1uLhVz1NRcJNd+gWbqz4SlkIw03BBrqdAOvZYHqnWCpKmZsrBjM4osH9dk2xXEgQoHO48JzHmHSv0ZT5wwu57+yAiXrkRJ9WfCYNs95+3AOqwM/cW3AL1AYGMBU/i/q7AU6NLbTUouxdY45G9V3pq+kMDHVSJ+oYNoKLiKDPXDB+x8CtG+ELRBcnRns4TL4prl89cZxGmcL+aRPRDtApmUAjIP49carb5LfzwAwy42dMrRe8HrFfZOdeKwI0XLPuhEql/53MZnjq7gzGE/QdDvPVVhPQ== 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=ElbROuLTOxlke1Inco0ftGeMVmzdHuoKu5fx1glplDE=; b=MRc2pwxaL8GiZt5u0DS2AQ8omTij7uKfFxJsnAM0V0eDQTxtemUiwVNacdygRbD71wKorgPogX7jSsNrlwJo5vFsaYsTA5rGAATs2cXMbaC1JJULSpnfhoTJgJFZDGQTBixZeW6PI5ut/iQ52shNMpen5gc0+8pu55eH5ClyGAMgtr+04Jb+xIo/PAyzHO4kyxRA0HjNVo3RWobq9Zfa95cZ4X5l+39yvj3RSi7vg4E82s0vQ7aBFcCK8eE2rXG5KoZlrNuUM7MmzBu12UI2iggLghU0LMKibqhj8iSLt+KXtkUQborsV7Vnfsyj2cJxA6SDyKDSY3RtfZ7USzCsMw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ElbROuLTOxlke1Inco0ftGeMVmzdHuoKu5fx1glplDE=; b=Ylk+hEI5JHuZrMoT0z/1gIlB7xGcqq7HxbMy1yFRXrgftTsgvCh6NLXmw+X3dK1vmY3rH9rJdFNPbpB+ck5ZB2rh7Xp8qBzySqLK2Ztiei/XkWN9pCeG86lwTVqxNJwX2BNd7b9WF1DruhCmBA4je1XhWzHnaeRO25qYlLDzN3I6T01mCtg3tAm8D9daLgmWcNdvTTcCMgO5pzg6+RTgRFKUHA3yLw39gv1U8Xxtwd5zWDGhtw9+l1OG+Qmg4v8wN1541fmqsqHYC96ZOUJyH/II15SeucQHbBLhzyY7oCOLATNNpaxePAfWegeuXv/RNI9bmDPJz/WBMuemhfkzIA== Received: from CH0PR12MB5041.namprd12.prod.outlook.com (2603:10b6:610:e0::16) by CH0PR12MB5089.namprd12.prod.outlook.com (2603:10b6:610:bc::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4195.20; Wed, 2 Jun 2021 13:25:22 +0000 Received: from CH0PR12MB5041.namprd12.prod.outlook.com ([fe80::4051:6d8:dfa6:e554]) by CH0PR12MB5041.namprd12.prod.outlook.com ([fe80::4051:6d8:dfa6:e554%7]) with mapi id 15.20.4195.020; Wed, 2 Jun 2021 13:25:22 +0000 From: Bing Zhao To: Matan Azrad , Slava Ovsiienko , Ori Kam , Li Zhang CC: "cristian.dumitrescu@intel.com" , NBU-Contact-Thomas Monjalon , Ferruh Yigit , "andrew.rybchenko@oktetlabs.ru" , "dev@dpdk.org" Thread-Topic: [RFC] Support metering policy for yellow color in mlx5 PMD Thread-Index: AddXsruDshSQxwzPSReXsI6dX/mJSA== Date: Wed, 2 Jun 2021 13:25:22 +0000 Message-ID: Accept-Language: en-US, zh-CN Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: nvidia.com; dkim=none (message not signed) header.d=none;nvidia.com; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [154.18.175.99] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 278b2ad0-5cfd-4839-ad8e-08d925c9dfdb x-ms-traffictypediagnostic: CH0PR12MB5089: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,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: SVaU+UbvTsXH1jfpIcJKVYrvRoCBLuCXGXBJGLUB/MynGH0OUtgg46KYbbukiTR9qOkrF+8uZX1rXejRMYFTewgN//kZqxihg5PsJVYRYDeCvWBEik9Na41ibBoAFKAZG0Wf/BrhwFEYFVmzVK3kzEr+AspVBYWIqRNFuyhAH4tqBHcIXpC4MtCuJKuGope/KYa4nZUqALXyuBpNJkn+DSaND2ZH0zuVLN1kg7xV2wMzUI/5dzKThVl4tOe+oHKGD6r5HwtSivc2+KJJXQ3+Us1QLCP+WruBGbuBiNbmYnWn7S2yNbeNWAiMIBptAMHfOr99sccFvYX6p2lm0z/GtRB0sLnkrgWA2ErtXCu2gycgArTxDX33IJ6oqoBbFRe1CFssZNCnl29/q/Byuh1uNqjPDqqclfGSGLvZgLeP4kc5Q738WvzfMc6hSRiSqajOtfkONQ+4I3nPIOKctrVxlsANGW5k298420sbi2rClVGdybiBQ6iUhTLDr7NjflneUGFVCHfgqD3aq1t5JmevGPEwuK3qiXAdkID4uFY2Tg8LM9bgOLYWAu1yGuBAaZg44IdJDN5IesbFkUiXZ+d1rgr2a43xi7wQAWA1Zk4Xq+U= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH0PR12MB5041.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(136003)(346002)(376002)(396003)(39860400002)(7696005)(6506007)(110136005)(54906003)(38100700002)(66446008)(86362001)(122000001)(186003)(316002)(76116006)(66476007)(66946007)(66556008)(64756008)(55016002)(26005)(6636002)(5660300002)(9686003)(71200400001)(33656002)(4326008)(478600001)(2906002)(8936002)(8676002)(52536014); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?0IlZdrpDyI6tVYQlhXCSByA53GswhtPK+U1QnyOWERBMDcQvlVTQHezy7SKu?= =?us-ascii?Q?iOVPt4hgz9f0tnVXvassDWVGeLLEzNYSRDWRRhvAYJ9OYAquyZw3HRSciVSA?= =?us-ascii?Q?OOKQDbIffzMCf03dC8mv6bTTsrbr+65QhK1xJpx1K0QatHWi6yGRWbEvsmEj?= =?us-ascii?Q?MP2OJYB5cx8a2Zjqbtf8/c6KY74OV4DM7IKx594n9xbR5u+A0hGPDpnEp8nd?= =?us-ascii?Q?JOMwHSNn/gKn7E4p77jwFw1Z8/hWozlRfDbR/bWWtoNe4ysyqIDnQDO7XLpK?= =?us-ascii?Q?gihdNIflKx7mQC6g8cLsAPmZcCsfiG+pAOLxUIR6BjuzJNbjHVqwvwfKYPZs?= =?us-ascii?Q?r6+W9XjyNla/thAriXr4L4zZHBF/a8VfqEJtuVx6cjIWllRgfYEbyiJHQPl6?= =?us-ascii?Q?rdq2uluECJv+X8KVlvY/cpCUVrYgseOILGixG0sABW7RX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iE2hSxcxYjaaJn6c/J?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CH0PR12MB5041.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 278b2ad0-5cfd-4839-ad8e-08d925c9dfdb X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Jun 2021 13:25:22.2303 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ANFU2lmen+PrudqVa29HKjKGltbCnzGlwE6+h6h5ZSmaEL3HlU1Obee/L9b767f+dVlZwBvQz90nbAPT5sLilg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5089 Subject: [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" The current API of metering can support different policies for different colors, as described in the header file "rte_mtr.h". /** * Meter policy */ struct rte_mtr_meter_policy_params { /** * Policy action list per color. * actions[i] potentially represents a chain of rte_flow act= ions * terminated by the END action, exactly as specified by the= rte_flow * API for the flow definition, and not just a single action= . */ const struct rte_flow_action *actions[RTE_COLORS]; }; 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 meterin= g, 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 differen= t. 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., but = no support for YELLOW. The support of policy actions of YELLOW color is added = to provide better flexibility. 1. The actions to be supported are as same as those for GREEN, including 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 be the same, like level, hash fields, and so on. 4. No change for the RED color is needed, and the default behavior should still be the "drop". The testpmd command line example is like below: 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 ... The actions list configuration for different colors in testpmd CLI was already supported. There is no major change needed for the testpmd CLI. Signed-off-by: Bing Zhao