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 9709AA0562; Wed, 14 Apr 2021 10:59:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7EDAF161879; Wed, 14 Apr 2021 10:59:39 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2054.outbound.protection.outlook.com [40.107.243.54]) by mails.dpdk.org (Postfix) with ESMTP id 7C1C316186E for ; Wed, 14 Apr 2021 10:59:38 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hY3i+HB2jUZnBs7Oy0Hq817pcBk6R5+8GVgENHVD5hMcIS9h5yOvsY8e4/z4G7yZ7WZyVlw+iVeAqabrUXZ/qRzLLXLVgV2prQGRvNlQb/uBl/58WCuTsBbB5b4dH9fUO2zOb6BLSQKaemJcQGC0xnIw4TEvrldyKwLa4ithAdgNgv7BY/XJ8q6FsPuFwRtxtH8WGK6ipKz3awZHeg64mtnxIQ1V8gTwWj+G+/NOorFC+il7oM6eR18T4FKT0pQW3nPdgw6T97TgKGCefSNoXP7iuIohZmYq06ktDGsKCs4UQYAbS8obwjQMimqEAO6FzCP8MO5TZZgA5EutYe5adg== 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=yNIlZTMIq+T7EKhyIe/u/Da5K5dL0dS6MNCYUG9Y4ww=; b=DJOgq0xyKGjNcu7pJL987wGnd3ky1r7Mgc9COX/z8utizU6FxSJQv9tHA++MwOL4R3lV8EjYbZ1RkQSbydvEt099NNA5v6GAvnTO+uyC0bUAyLZ9rfdoKiGapHq2Zu6/INfIKPkAuJJQVwUXM/WW4sjmtj11KIRuVaofGysSK9cW3vroCegWDA7LgUwxVCW3zNZAu1bWg0r5oXgxj10ZG+ZlTlQpZ7/o8NP4ZJcns+AxHqUTGqnS/kgBEsAsHU5kDIAZTrCcNrfCVrC5/127bxh0qK42eaawWANF3jdaqXRU/Mig4ox9XwndlxcoGeYk/YsM3XofZestl50F2Et5qg== 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=yNIlZTMIq+T7EKhyIe/u/Da5K5dL0dS6MNCYUG9Y4ww=; b=Mr+pfS0U3mOIMUOhUqOMUziIIs2vcKnO37JKm4XrldX6/EaHwSW2WqWpffJcPYgAb0tAjUz/9KxvaPl5RpiX4+kPLUsbgPerRo0kJnBWGf1wRRVcQLLU0OMoIM/RCGwevCJ0DZfbJwbj2+LBvjjJio97UC7N8Dg0J0342W9kMcr6gL0lfnTPXVjFMf+IwFfuNF9a6ty0VFGFWBBQ95ADSRo0eoYZENtIL43r3IXhy9fOL6HvK4Z+ZLjxwF1GCDHs3UpPd3OhCrDp5iRt4WKe6MtAS2YgwygA6wTFkp+dkcSdjrJJrOCwZ9rjePs916SQp67ij3Y81bjthnCG+jWr5g== Received: from DM6PR12MB4090.namprd12.prod.outlook.com (2603:10b6:5:217::11) by DM5PR1201MB0041.namprd12.prod.outlook.com (2603:10b6:4:56::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16; Wed, 14 Apr 2021 08:59:36 +0000 Received: from DM6PR12MB4090.namprd12.prod.outlook.com ([fe80::fd19:da7e:347b:87da]) by DM6PR12MB4090.namprd12.prod.outlook.com ([fe80::fd19:da7e:347b:87da%4]) with mapi id 15.20.4020.023; Wed, 14 Apr 2021 08:59:36 +0000 From: Li Zhang To: Asaf Penso , NBU-Contact-Thomas Monjalon , "Dumitrescu, Cristian" CC: Ori Kam , Slava Ovsiienko , Matan Azrad , "lironh@marvell.com" , Wisam Monther , "Li, Xiaoyun" , "Singh, Jasvinder" , "Yigit, Ferruh" , Andrew Rybchenko , Ray Kinsella , Jerin Jacob , Hemant Agrawal , "dev@dpdk.org" , Raslan Darawsheh , Roni Bar Yanai , Haifei Luo , "Jiawei(Jonny) Wang" Thread-Topic: [dpdk-dev] [PATCH v3 1/2] ethdev: add pre-defined meter policy API Thread-Index: AQHXMHW5yIwGcMe8JEqKD9UyeVyGTKqzW1+QgABMqYCAAAyXAIAAAx/g Date: Wed, 14 Apr 2021 08:59:36 +0000 Message-ID: References: <20210318085815.804896-1-lizh@nvidia.com> <24522212.gn4sJpSb88@thomas> In-Reply-To: Accept-Language: zh-CN, en-US 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: [139.227.253.12] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 082a2df6-67f6-4644-eee8-08d8ff23a0fb x-ms-traffictypediagnostic: DM5PR1201MB0041: 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:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: uxRUknIwHpSD4yhgNu+yqp7udzs0Nz1uB9Hm234vFztEezRnm7tXOZ65DiB2AcYiwPTPROAbgm+R08VvyD3NgAhQlRUbNVtEu4whup7slM8YXwuwwIAiqN6hXln8rSUMMUoHGr6B4MLFLUIUznMK7gAqGJAou1yFjzjrI2P8NeCMqhRXqpb8+c4Crpx2ieoZdd9q0Qbdt0gyQqn7sUVQo/2BeQ44DpVjim8wRktilhMBhUZdTM8vmgWwHusvUYS1gVGU4OSWKFkFY10wulNKhxlNpT6/YP6M5MYImVIV6gi3sDJ6NTtMxzpzseZVAkhsVkbMk7OGgPmZcJYW8bR+ZpOdJIkjVKurcgezqaL8OflhMll6/Ulw83LYHJNaTeC8DUW6QBqa3Aswbn/cmaxuMi5nQ9xBQ2CwViyJIhtvMqj5h2uz8d3EYJlJcBVdrNDIRV0UGMDr9Uptahtr1/TiyliY7YKQZ+8htrIJ3JVWJx3awv0NOE5UKD98hPgI1iONhgaw9DBZa+GuXxoapHy00bMamW4o0dQVM3wZuFb4ixWh5AE7D0MTzUKzf6ModMdWK/YWM4JwLkCDrcKG/2gFzQsBpax49AxtL1ny8DNyqF0= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR12MB4090.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(136003)(346002)(366004)(376002)(396003)(54906003)(7416002)(7696005)(8936002)(86362001)(76116006)(316002)(122000001)(66476007)(66446008)(64756008)(66556008)(66946007)(33656002)(110136005)(8676002)(38100700002)(2906002)(9686003)(71200400001)(55016002)(186003)(478600001)(5660300002)(107886003)(53546011)(52536014)(6506007)(4326008)(26005)(83380400001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?yZr/tam4Vak+yVWV4PL9pURHuDggV4+pVVomZt4JnrCKRxfrVqthzbDnqEw7?= =?us-ascii?Q?yc6xDfDjSreNErJmJ6jHHCBe8Zvk57fV9+O9zQ0j0fSejqOUKn21JyCFLBUD?= =?us-ascii?Q?Kg8f7k51NHRcdzh/lzAMMUo5d4aPOiWqH/rkoC8DUiL9k2ttLnQDPAqA9bfT?= =?us-ascii?Q?kkFPjo3eGAgt0SHq3Vkf+QBjeWWOeC2KY9E8mMoe8sn83RAH1hSnDvdy4xUh?= =?us-ascii?Q?c9xwIryzNIrh3B7rn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?us-ascii?Q?HYDnLh9KNOKLDKcScGJc5YVP53l5nQABQz3MTFKpDpp3K0t4Xjy6vzeI251l?= =?us-ascii?Q?FMJItR+TkYCgy5I4yAehXtNkJYM8JNmUKooUUbSUlZ3DGCNSqzXAD3Sr//jR?= =?us-ascii?Q?czhc7eUtaAcxJtS+/QkxXCbnYa6YxHqQ9hX6d5MV8XKqk4otLdsXV7CY+dDG?= =?us-ascii?Q?FtllJjMBw7/iVS0239mfuKzl?= 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: DM6PR12MB4090.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 082a2df6-67f6-4644-eee8-08d8ff23a0fb X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Apr 2021 08:59:36.1523 (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: jL+z6oevnmMQ4y38fjacmlep6QB7NwM8GH6gFfwKfKLeWWnmZP4eTCCxbdBgrpwW X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1201MB0041 Subject: Re: [dpdk-dev] [PATCH v3 1/2] ethdev: add pre-defined meter policy API 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 All, Thanks for your suggestions. I delete the example in V6 patch. Regards, Li Zhang > -----Original Message----- > From: Asaf Penso > Sent: Wednesday, April 14, 2021 4:47 PM > To: NBU-Contact-Thomas Monjalon ; Dumitrescu, > Cristian ; Li Zhang > Cc: Ori Kam ; Slava Ovsiienko ; > Matan Azrad ; lironh@marvell.com; Wisam Monther > ; Li, Xiaoyun ; Singh, > Jasvinder ; Yigit, Ferruh > ; Andrew Rybchenko > ; Ray Kinsella ; Jerin > Jacob ; Hemant Agrawal > ; dev@dpdk.org; Raslan Darawsheh > ; Roni Bar Yanai ; Haifei Luo > ; Jiawei(Jonny) Wang > Subject: RE: [dpdk-dev] [PATCH v3 1/2] ethdev: add pre-defined meter poli= cy > API >=20 > >-----Original Message----- > >From: dev On Behalf Of Thomas Monjalon > >Sent: Wednesday, April 14, 2021 11:02 AM > >To: Dumitrescu, Cristian ; Li Zhang > > > >Cc: Ori Kam ; Slava Ovsiienko > >; Matan Azrad ; > >lironh@marvell.com; Wisam Monther ; Li, Xiaoyun > >; Singh, Jasvinder ; > >Yigit, Ferruh ; Andrew Rybchenko > >; Ray Kinsella ; Jerin > >Jacob ; Hemant Agrawal > ; > >dev@dpdk.org; Raslan Darawsheh ; Roni Bar Yanai > >; Haifei Luo ; Jiawei(Jonny) > >Wang > >Subject: Re: [dpdk-dev] [PATCH v3 1/2] ethdev: add pre-defined meter > >policy API > > > >Cristian, Li, please remove useless context when replying. > > > >14/04/2021 06:55, Li Zhang: > >> > > + * Example #2: GREEN - Do nothing, YELLOW - Do nothing, RED - > DROP > >> > > + * struct rte_mtr_meter_policy_params policy_1 =3D > >> > > + * (struct > >> > > rte_mtr_meter_policy_params) { > >> > > + * .actions[RTE_COLOR_GREEN] =3D NULL, > >> > > + * .actions[RTE_COLOR_YELLOW] =3D NULL, > >> > > + * .actions[RTE_COLOR_RED] =3D (struct rte_flow_action[= ]) { > >> > > + * { > >> > > + * .type =3D RTE_FLOW_ACTION_TYPE_DROP, > >> > > + * }, > >> > > + * { > >> > > + * .type =3D RTE_FLOW_ACTION_TYPE_END, > >> > > + * }, > >> > > + * }, > >> > > + * }; > >> > > + * > >> > > >> > These two example policies should be available to be used straight > >> > away, please make them real data structures, not comments. > > > >Wait, you are giving code examples as part of doxygen? > >It's really too long, we don't do that. > > > >> > I suggest their names as: pass_color_policy_params and > >> > drop_red_policy_params. > >> > > >> Thanks. Will change the names. But it can not be real data > >> structures, since it > >just one example define and no use code. > >> It will bring build as below: > >> error: 'drop_red_policy_params' defined but not used. > >> User can copy these example to his .c file when it using > >rte_mtr_meter_policy_add(). > > > >If you need to provide an example, we use the directory examples. > >I see rte_mtr is not implemented in any example, so it could be a later > >addition. > > > > > We want, as a rule of thumb, to provide more code snippets and not > necessarily full-blown example applications. > Where do you suggest having that? > In any case, I agree, this can be removed now to allow integration of rc1= . > Doc can be done afterward.