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 9EEDBA0524; Wed, 14 Apr 2021 10:47:22 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2035C161845; Wed, 14 Apr 2021 10:47:22 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2067.outbound.protection.outlook.com [40.107.93.67]) by mails.dpdk.org (Postfix) with ESMTP id 7F353161828 for ; Wed, 14 Apr 2021 10:47:20 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ivXS2AbROO6JCgdonYawfA2xRwkCw3KdimrzGlSZjqj1SRV80icS1vncanN0+ck3MgbNw3rvJwh7UlkwyyMsNG3ZR1HCrMQcYhqMikhx8SyYY9Wr5dUK4hAjJcN8jkqkNtxB9+0uOYWY29ZHPc5LnWMC11Wc1n/Q4hmzE5ghLkO0OJBGrmxfDw6c87tvR4oQxcKqUfv2SuEjSpjk344rn+MK2tupsHPoP6oixUq6t9GqlOHi7uutQXCFWrVY10HkkvGrCPcUms9HQqu7+etkLwSXT2zn4A+HuayrX4ZgLd9iy/En5zqTQtsJDNfBwJUJE5XhZKCU0BSEBBvAvba2kg== 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=0Our0CGp+4IBFTJ3jajTY8eydN7p3NvD/XICX/WBkf4=; b=EOrE80g1khTcV+rQAQmcoEs+mPDOWhhpmVGsyx8Gx8E22mSJhArirk2pbDk6uI2OF9TUAMy0eqHCJb1zf+W873GEKKR/c+RMBJCyemiDs+jJo8tUGgWwkQBSCBzVCv+9Ehodni3nxivJKEpnZoquvEu3RnHz5WH3aG738gJtCWWqV9+D+Cf2Mu4kLbDCF7yQz9v1MdP0ALdS1F855gsKUWxZsGMgIiEfP/o8mNF5+L2DH89VQgaV15+hJiJmbyAP0OuFGf3JFpc7Jlaie5QSRuFXzjGj72p/BBjgR7Ru6Ye+beAGHBiUW77d1cNkmj22L2kzKaxBDrqfdeGZYwC8Yg== 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=0Our0CGp+4IBFTJ3jajTY8eydN7p3NvD/XICX/WBkf4=; b=Z6ZDRLFWuS0mv7F5VsDNF9b77gO4Yf7dJy1RI6b9fn63zX6rpR77J6BXVRbwek0FlSa8GD1L/mM2QaP8+3ME6iCYb0ln67yZAbzK8fS9frug9HX2yBBNCZAWpT/b+6UicVdPA1dzSNqCzuyw6kraXbSiGNLV5Bfc8sFN/KDO714D0y83cKIvGJMJ7RyryFSyb7bWdBGf06GHy14HAqUtrOQrJI6ZODGVBknjZ3be7jtmHcql2SDe3bLOZCybZ5oaHQzyJ4xPKRYuVYK63DixCxdbIPtItVVOFIWj/P1fW12NGvBs3BR7cgyGCj1VH2Sqt/tFNd8udA+5q72URvc6BQ== Received: from DM5PR12MB2406.namprd12.prod.outlook.com (2603:10b6:4:b7::23) by DM5PR12MB1388.namprd12.prod.outlook.com (2603:10b6:3:78::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.20; Wed, 14 Apr 2021 08:47:17 +0000 Received: from DM5PR12MB2406.namprd12.prod.outlook.com ([fe80::296c:7adb:3a40:a762]) by DM5PR12MB2406.namprd12.prod.outlook.com ([fe80::296c:7adb:3a40:a762%7]) with mapi id 15.20.3999.036; Wed, 14 Apr 2021 08:47:17 +0000 From: Asaf Penso 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" Thread-Topic: [dpdk-dev] [PATCH v3 1/2] ethdev: add pre-defined meter policy API Thread-Index: AQHXMHW7gzaG7nCjPEaXoXUEQC0Ir6qzc8CAgAA0SICAAAwjwA== Date: Wed, 14 Apr 2021 08:47:16 +0000 Message-ID: References: <20210318085815.804896-1-lizh@nvidia.com> <24522212.gn4sJpSb88@thomas> In-Reply-To: <24522212.gn4sJpSb88@thomas> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: monjalon.net; dkim=none (message not signed) header.d=none;monjalon.net; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [87.71.141.78] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e93f1e7a-772f-4024-9ce7-08d8ff21e86a x-ms-traffictypediagnostic: DM5PR12MB1388: 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: 7zP39vlhnX0N07wubzT6BvV2sGq9M6zfqYSvF9JtEBzGWInwZv/Rab+VJIIf/AfaK8Z+RwxZSG3KBgOlq0vETEMsPI6srDm/5PUgyK1NUkn2TEDHWoaFM9ZzMoFMitrBBqV79OPbea911/4ZSAkvlDUR2u6m1uEdcnn7/w4D/wGsk5/Bpj7aNdQk0TXpTz6WnX7Sa4LY4NF/xiubthfs0d7qgWkkTUthpqWfw35UW5FuGMundgwAW3Tn16+3JFX9WmNcjS4cEebpIk7iGJsHINKcsPUSWOYkjiETERKl1UA99b0uARyrro0AinLNpBkEFOsvvZ/bMPLLzV06199X+Dzyda6RyYsS30eGrKSPycIs+eUnhexxBQ8TDeARNR+VL2xu+EsJpsB7HIYgABEbN7XwxHfn1E/Vdayph/RdgyC7YA9REQU8zroR1s2VrqygdXLPQ7oFFW18ao2ggJUH3LICPP2QFuVTEPPB5W69KUZF8qPBReL3vfDCeHsnZiwMoapqCA/Ylf/ksGeXJRwXzNI8n8CGBbaSIS7hSGIZ7cOiKXRM9V3owolKfTCF66p1my+4xynop2+S89XwsutXpcZGkke6s5uuLhSaUVgN28M= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR12MB2406.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(136003)(39860400002)(366004)(376002)(396003)(9686003)(186003)(110136005)(66446008)(86362001)(8676002)(8936002)(6636002)(33656002)(54906003)(71200400001)(5660300002)(26005)(107886003)(122000001)(316002)(66946007)(76116006)(64756008)(6506007)(38100700002)(2906002)(66556008)(478600001)(66476007)(55016002)(52536014)(83380400001)(7416002)(4326008)(7696005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?aIg5jZaGyz+Fnqpj0PHJxoypMv6NLHGfBmz1LKjH2hT3U5v7KGUUhpNMDfVp?= =?us-ascii?Q?NGi2V7KWYJuzC/oXST+MqXHcP3R0C2aw1cxDubpu8X9cwY+wcJUrwDYxkTov?= =?us-ascii?Q?H8bHnCRv2HX1lXKboNV4ZpgDilHYDWZrhuyx8dgDvvpNv2HjfUMZiK/Bnu+f?= =?us-ascii?Q?bH0f/zVF+SveO4+wF79lnkggCmoQCHxqUV5vB5V15dxdbflBlHRKB0kngAJ2?= =?us-ascii?Q?liihWJ921qBpUapCqXyqXWO/TkCRHzpC+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TOw8S+X?= =?us-ascii?Q?V9XPWY+a1sGrqFWzLV/6l2qJEs2eR4uORzs3T5ChvrsWd084U19y0CNossKi?= =?us-ascii?Q?HEOIM+VkjNwAakcsrJucmJ/tUARIgRgYcgMVgY9isqUh1xMAK6f33eevqcty?= =?us-ascii?Q?a+NIgrdDG1ramWkyDhDel6/ASuUJNoOvbrheHyNADse3u7oosGx+fjX+Fpbb?= =?us-ascii?Q?KJQ9TyvgQwIEirofnL2o38M0?= 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: DM5PR12MB2406.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e93f1e7a-772f-4024-9ce7-08d8ff21e86a X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Apr 2021 08:47:17.0090 (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: vKuKTFM0SLcAt2nWahxqFroPJVbUzfjrNsJ0g+X/c0V5QxblpNULfoh3/XUL+Y78vjT4kk30J/On3wOOKznoeg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1388 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" >-----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 ; Andre= w >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 polic= y >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, s= ince 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 necessar= ily full-blown example applications.=20 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.