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 EE9DAA0553; Thu, 26 May 2022 14:27:43 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 965EB40151; Thu, 26 May 2022 14:27:43 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2056.outbound.protection.outlook.com [40.107.220.56]) by mails.dpdk.org (Postfix) with ESMTP id 536E440150 for ; Thu, 26 May 2022 14:27:42 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eyXGoac1fr6qy02WkFBx56TxOUWu1VJ0Cb4SnrBU5YiUtXe5sQ0ZoTG0nIBRpfm0/CbplAew5UX1/CkY30nkYBgIulLcLpb99Tn4Nf+la7bZ9PlDLlmZ28olwIC4UOCQP8jdAHo5jU6zKsTe09IdqppjIjkh51eFdGe9kbSijL1NDOroc9QSUAx57pLiVIL4AI5pk4CcSYfRqpbCKanja6XXQrcMko23g4xmcPF05jrspjZqgQ64aOGp0OwH9zGwkf+j6y/QRgSzvxheiK2TrntwRLjJeU4D+lIKCOENDTB2DaJtxiDz5SpbiM7XTgA8Ng8O8nlWLrlHoCphzRFiGg== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=7ujjZwwtD2yK21Zi+j5gwQSvu3+9qIi4cstQgbEr/rw=; b=Pq7VyRW6VB6mT0KWwwyItT0NDaNjkthF7+WGjgVGAKrbwQvbC0uLLpS3We6oZr+nzRq19KBb6zx18LfwV7AhttkVMfnSeAivv21dsWoK9T7fkkewXie3J2lO5Y+6L71z/UAxv70SWxm/Pd8jZR5scd1+QMSVWejFL/j2sDaVZpexcuD6JZOEaDLxrXuq+Dac7Vquls4Q6X0luSpupdYeblBiemoTJjRIAcvPcE70M+lX/37qY8sOIeK22Qv7hgJFE8ikgg5TI60e41HF/8c0+hTRXBdaiGICbSdshZyN5bpb0wQFVUhMSrVMoyiNOt5lZVziqt71gnFj6MMcgKthsg== 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=7ujjZwwtD2yK21Zi+j5gwQSvu3+9qIi4cstQgbEr/rw=; b=XmPFdHKb8Bi7sfJD2Gknp6S8HMr28PPCO0//8hKepWAfa2fWOHbnHKCwey5L2Yb0TX1eRf1CQV4vcFzQS0CIktg/x/TR5khjOlRM6Jk9XRxTtGmJZAKFQTiw+8K2vHEqfkJrBi1DgIQTYc2rBvACNlI4LjykJ8X0p4SrrpMI/arxvXat3hlm9ikXtOpjyatj/sipWAf0ZEFCJhJ0Ekx3YnILo9klVA5qKMPagrL7X8dlTUBI+Qji+6jGyNkvxGZqzpEdRp+xwr699c/2evfZdE7GXYKIv6VPzgtkd6AuiFEHtWUnnJxVaivDTme+GXmmR18yW2Gyx7BepvWBvmYduQ== Received: from MW2PR12MB4666.namprd12.prod.outlook.com (2603:10b6:302:13::22) by CY4PR1201MB0085.namprd12.prod.outlook.com (2603:10b6:910:1c::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.19; Thu, 26 May 2022 12:27:40 +0000 Received: from MW2PR12MB4666.namprd12.prod.outlook.com ([fe80::edeb:4144:1ee4:83a1]) by MW2PR12MB4666.namprd12.prod.outlook.com ([fe80::edeb:4144:1ee4:83a1%6]) with mapi id 15.20.5293.013; Thu, 26 May 2022 12:27:40 +0000 From: Ori Kam To: Alexander Kozyrev , "dev@dpdk.org" CC: "NBU-Contact-Thomas Monjalon (EXTERNAL)" , "ivan.malov@oktetlabs.ru" , "andrew.rybchenko@oktetlabs.ru" , "ferruh.yigit@intel.com" , "mohammad.abdul.awal@intel.com" , "qi.z.zhang@intel.com" , "jerinj@marvell.com" , "ajit.khaparde@broadcom.com" , "bruce.richardson@intel.com" Subject: RE: [PATCH v2 3/4] ethdev: get meter profile/policy objects Thread-Topic: [PATCH v2 3/4] ethdev: get meter profile/policy objects Thread-Index: AQHYbcnlfAmYJwkeZUSI7vVzKmGRrq0xG1pQ Date: Thu, 26 May 2022 12:27:40 +0000 Message-ID: References: <20220518043459.1281590-1-akozyrev@nvidia.com> <20220522105102.1692526-1-akozyrev@nvidia.com> <20220522105102.1692526-4-akozyrev@nvidia.com> In-Reply-To: <20220522105102.1692526-4-akozyrev@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a779d3be-606c-4bf5-14f1-08da3f132007 x-ms-traffictypediagnostic: CY4PR1201MB0085:EE_ x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: yRFqhTXr+aImeyvkMPJyKAQHdFzA1qHuhml4+5uskRLyGH1zYCbA+BAzshMVuXwPXC+29bFPp4ts9zMOQoAXf7aBYclFVAtZf7wCCqxVSqyXm7dhtCdn6Clj2J0FGJK3BPhXZWp8CCUUulFSS/UQcTy/eTnN4K55fMZrc4K3KUJNBOuFg13LM6kJjjgtohnKObc0Y7IOUN8yp5Z0xjmp/FkDzS0kEDPOmZABFxMba46ej1LigNMJ1r0zHOCSlST7GYj6ZQJ9S3tvdnYXz51JEhdy8TcoUDblrzGeZ9wf1dlF/56cuMvGxXSG4lVBpxV8F/vI3DQvcfD4p0AZ6ISzuz8W8Q+FzDQgth/luoxue4LxfqnAGN05Ubd5Q0Qsfzlfp9/1pfmMpCXmHPca890UiP1F4Mj+kOSR6CaMUYsGXltHMS/s51o50/glauUJAa/9Manzh/O7myGnNnQGSpoesaL3MbzF+r7c3N1jaVS4Wouym/TbMJ1Vr3DMOePmI4USCqJqxbR6sSZLNRFE7ckjheiF2AvpbTQMKJloXPDTgvf087J4gp/FKaAAu5vFevJFMPI/1SEendLoG/QYRy+My+l2xXQ6NX+tORxlwwx8eHeiJBrDU9fxtzJ2+Pqc/Yraja4JyigL0qYL81uHnRpFNNcv7K3ecXi/vxPhRcNMNliD7O68Jc6fuRhCVVU0UaGEyeHpj7LmolLWI17kuYhFWQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW2PR12MB4666.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(316002)(53546011)(2906002)(64756008)(7696005)(54906003)(71200400001)(86362001)(66946007)(66446008)(110136005)(508600001)(5660300002)(7416002)(26005)(33656002)(8936002)(9686003)(8676002)(4326008)(52536014)(66476007)(66556008)(83380400001)(186003)(38100700002)(6506007)(38070700005)(122000001)(55016003)(76116006); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?3/GZ1yC4EmeAJyBIfAEi0ZMHX4AtudJIP+sqo0gAFM4eyiWP40Vjs2chc/ss?= =?us-ascii?Q?TG7qb52/xdfHwyuHs+tIaRCHnej6sPrrIEx2tEY8QJCvd52hDgTiSSIQ5X2d?= =?us-ascii?Q?8jSOu0etViO6mGwzFYYjueHSfErWkHV/lz3pAZsxJTMi/ai0SrwvCTHGE1G5?= =?us-ascii?Q?43PB/FtYaJQqQaR2BxY38FAD5uFqZsCD25PgZHmYnwflphPuYxw5uGItrIMX?= =?us-ascii?Q?G7n1FaY0SM83LgP3n7QDfsi2TCQ3HmYvElUR+IfvDJ6kwYHZVoSMtIBnWNzq?= =?us-ascii?Q?t2KvnP1vw0w0lmo55oWFlDLjQBbuAMn2UwMLBXC+A3ejMIDGUXbm5nFW5H95?= =?us-ascii?Q?47hxOIr5PW+YJrfSxswON/+6sf2x074fdTc4l+S4CfN1qXhpaU0UQc0YzDIK?= =?us-ascii?Q?blfr7Y80VVtdWl6SUAwVUniuWmremmMBzpGMZBxZWiommSuIOC9Sjqs8oOYd?= =?us-ascii?Q?rAewo8S8wyUUuNOx5gOqS2xJFSw9mtRYtmRdwJ34dg03kwT/CEejOMl7k6Dr?= =?us-ascii?Q?MJmiMFKEhLdDpQ4yev2xVoZbLABe6lGoQo7WVQMbtln3Lwg1HzrDgbWd1uct?= =?us-ascii?Q?wu5W6rv9OwCYLTN44IhzYj0MZYgBnTS74XpgAmZi6AdWeLjumZe+ZbFJZNbL?= =?us-ascii?Q?reNVPW/U1kD+Hid+lPwyUofmFpVuRKenFFCqFZHnhV3xIvMO339SQESzy7wq?= =?us-ascii?Q?YYA47pW8qy55vDEyZwUW80LONcx7TOdgMFF2PxvabSWrVMmRYKACXoGU5zz3?= =?us-ascii?Q?1c8eBrvnl0bXr4PobDKYq+SdpprDKOgSgJ2C0OkE5HFrUzb0rkdvT14ZAlXo?= =?us-ascii?Q?BrzcJRrvWLfDkF4OvB3U2NiK3Zoi0xW42FUG+8c1kWrxhwQ2kjA7AMpH0ogL?= =?us-ascii?Q?nEpAdROgpo0/q/UEmzbdADZ1MvlgJCAxygLNPYCd0P//kk18TE33qUK3G3A1?= =?us-ascii?Q?DDa9Peu8ZuY7RlmWU46h5fPQy8RIdAoJslRsEEjqc+XWTZ7dnlk4u1XANbI5?= =?us-ascii?Q?VlwkpvH7FNzIeYr7vbGSo0LtVmRCkCXa56/8vrHqnW51kYGwZ8HRVDnHd1Ko?= =?us-ascii?Q?yG1i0LYEgZ72sacYRsZIBpLA8OwCzXIWSTptichX9lyGwyihEMWhQB5LH7f8?= =?us-ascii?Q?w42C9UAYHEN62IGOAlRuPMZKmitzG409WBsK9SOJmk31z0PTWvDkvJHYuFCp?= =?us-ascii?Q?FlJ3IlyQItt5Z3L/oeYuTAo4nAPlKARn2Cyt+8lr5QkfEXnch2kViKTDJaIz?= =?us-ascii?Q?3Qoljfp+Gt1DiBMRE6glheON+MX9gPP8unTbYcFgExNo1ZfRybdP1nhMcp1r?= =?us-ascii?Q?C0zIp+Lam+iLajSToi9sV3tZz7EI8QZO9oCieVTTb2kU+nFctia7StADf9yM?= =?us-ascii?Q?4vQ6//wME8G4kgerthNRFZcSYf5lCQki8BIGHDOwHGMl+pfi40iPA3SgjBHu?= =?us-ascii?Q?+ylhCyCoFvcPPS32L+lVh1ElDM2IHOaZzxiHeagBG2Tm8S+666lSaUhMeMyp?= =?us-ascii?Q?ngYzCwrFcFNXT1ZRRWlxAZV9DShBPBOFHmYSSI32tRoWP8tbbz+wVk93FZov?= =?us-ascii?Q?TqHQcYOiEDVvssdIHEKY2tfp7GFJuYzsUie8SaB/EHg71db8Y+vekdTdKYtm?= =?us-ascii?Q?cz2TW8IqMxBL5fK1lX4QJUBeiTjDACbbLsK8+9MNIs+pTKrCjU2/lka9k4C1?= =?us-ascii?Q?HE3jsScEOnMCb12/Sest0G9MgSeIPro6C2DPFzsqSynPSvfyrM/wGDeL+m5O?= =?us-ascii?Q?lcHfnJkR+Q=3D=3D?= 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: MW2PR12MB4666.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a779d3be-606c-4bf5-14f1-08da3f132007 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 May 2022 12:27:40.0453 (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: 84PB3IJw1sOeKFfbpc5mNz53EWbuXlRD6vjAKe9GXrZ6MlEGW+c3dCFxXP0H/QdS8swo5wYWh2IuHAyYgNihUg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1201MB0085 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 Hi Alexander, > -----Original Message----- > From: Alexander Kozyrev > Sent: Sunday, May 22, 2022 1:51 PM > Subject: [PATCH v2 3/4] ethdev: get meter profile/policy objects >=20 > Introduce a new Meter API to retrieve a Meter profile and policy > objects using the profile/policy ID previously created with > meter_profile_add() and meter_policy_create() functions. > That allows to save the pointer and avoid any lookups in the > corresponding lists for a quick access during a flow rule creation. > Also, it eliminates the need for CIR, CBS and EBS calculations > and conversion to a PMD-specific format when the profile is used. I think you should say also what happens to this pointer or values in case of modification of the policy or destroy of the policy. >=20 > Signed-off-by: Alexander Kozyrev > --- > .../traffic_metering_and_policing.rst | 7 ++++ > doc/guides/rel_notes/release_22_07.rst | 1 + > lib/ethdev/rte_flow.h | 7 ++++ > lib/ethdev/rte_mtr.c | 41 +++++++++++++++++++ > lib/ethdev/rte_mtr.h | 40 ++++++++++++++++++ > lib/ethdev/rte_mtr_driver.h | 19 +++++++++ > lib/ethdev/version.map | 2 + > 7 files changed, 117 insertions(+) >=20 > diff --git a/doc/guides/prog_guide/traffic_metering_and_policing.rst > b/doc/guides/prog_guide/traffic_metering_and_policing.rst > index d1958a023d..cae35bccf6 100644 > --- a/doc/guides/prog_guide/traffic_metering_and_policing.rst > +++ b/doc/guides/prog_guide/traffic_metering_and_policing.rst > @@ -107,6 +107,13 @@ traffic meter and policing library. > to the list of meter actions (``struct rte_mtr_meter_policy_params:= :actions``) > specified per color as show in :numref:`figure_rte_mtr_chaining`. >=20 > +#. The ``rte_mtr_meter_profile_get()`` and ``rte_mtr_meter_policy_get()`= ` > + API functions are available for getting the object pointers directly. > + These pointers allow quick access to profile/policy objects and are > + required by the ``RTE_FLOW_ACTION_TYPE_METER_MARK`` action. > + This action may omit the polciy definition to preovide a flexibility > + to match a color later with the ``RTE_FLOW_ITEM_TYPE_METER_COLOR`` it= em. I think it is important to explain what happens if a profile is changed to = destroyed. > + > Protocol based input color selection > ------------------------------------ >=20 > diff --git a/doc/guides/rel_notes/release_22_07.rst b/doc/guides/rel_note= s/release_22_07.rst > index 451ff8d460..6d030bead5 100644 > --- a/doc/guides/rel_notes/release_22_07.rst > +++ b/doc/guides/rel_notes/release_22_07.rst > @@ -73,6 +73,7 @@ New Features >=20 > * Added METER_COLOR item to match Color Marker set by a Meter. > * Added ability to set Color Marker via modify_field Flow API. > + * Added Meter API to get a pointer to profile/policy by their ID. >=20 > * **Updated Intel iavf driver.** >=20 > diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h > index 68af109554..9754f6630a 100644 > --- a/lib/ethdev/rte_flow.h > +++ b/lib/ethdev/rte_flow.h > @@ -3827,6 +3827,13 @@ struct rte_flow_action { > */ > struct rte_flow; >=20 > +/** > + * Opaque type for Meter profile object returned by MTR API. > + * > + * This handle can be used to create Meter actions instead of profile ID= . > + */ > +struct rte_flow_meter_profile; > + > /** > * @warning > * @b EXPERIMENTAL: this structure may change without prior notice > diff --git a/lib/ethdev/rte_mtr.c b/lib/ethdev/rte_mtr.c > index 441ea1dca9..90fd277040 100644 > --- a/lib/ethdev/rte_mtr.c > +++ b/lib/ethdev/rte_mtr.c > @@ -57,6 +57,25 @@ rte_mtr_ops_get(uint16_t port_id, struct rte_mtr_error= *error) > ops->func; \ > }) >=20 > +#define RTE_MTR_HNDL_FUNC(port_id, func) \ > +({ \ > + const struct rte_mtr_ops *ops =3D \ > + rte_mtr_ops_get(port_id, error); \ > + if (ops =3D=3D NULL) \ > + return NULL; \ > + \ > + if (ops->func =3D=3D NULL) { \ > + rte_mtr_error_set(error, \ > + ENOSYS, \ > + RTE_MTR_ERROR_TYPE_UNSPECIFIED, \ > + NULL, \ > + rte_strerror(ENOSYS)); \ > + return NULL; \ > + } \ > + \ > + ops->func; \ > +}) > + > /* MTR capabilities get */ > int > rte_mtr_capabilities_get(uint16_t port_id, > @@ -91,6 +110,17 @@ rte_mtr_meter_profile_delete(uint16_t port_id, > meter_profile_id, error); > } >=20 > +/** MTR meter profile get */ > +struct rte_flow_meter_profile * > +rte_mtr_meter_profile_get(uint16_t port_id, > + uint32_t meter_profile_id, > + struct rte_mtr_error *error) > +{ > + struct rte_eth_dev *dev =3D &rte_eth_devices[port_id]; > + return RTE_MTR_HNDL_FUNC(port_id, meter_profile_get)(dev, > + meter_profile_id, error); > +} > + > /* MTR meter policy validate */ > int > rte_mtr_meter_policy_validate(uint16_t port_id, > @@ -125,6 +155,17 @@ rte_mtr_meter_policy_delete(uint16_t port_id, > policy_id, error); > } >=20 > +/** MTR meter policy get */ > +struct rte_flow_meter_policy * > +rte_mtr_meter_policy_get(uint16_t port_id, > + uint32_t policy_id, > + struct rte_mtr_error *error) > +{ > + struct rte_eth_dev *dev =3D &rte_eth_devices[port_id]; > + return RTE_MTR_HNDL_FUNC(port_id, meter_policy_get)(dev, > + policy_id, error); > +} > + > /** MTR object create */ > int > rte_mtr_create(uint16_t port_id, > diff --git a/lib/ethdev/rte_mtr.h b/lib/ethdev/rte_mtr.h > index 008bc84f0d..58f0d26215 100644 > --- a/lib/ethdev/rte_mtr.h > +++ b/lib/ethdev/rte_mtr.h > @@ -623,6 +623,26 @@ rte_mtr_meter_profile_delete(uint16_t port_id, > uint32_t meter_profile_id, > struct rte_mtr_error *error); >=20 > +/** > + * Meter profile object get > + * > + * Get meter profile object for a given meter profile ID. > + * > + * @param[in] port_id > + * The port identifier of the Ethernet device. > + * @param[in] meter_profile_id > + * Meter profile ID. Needs to be the valid. > + * @param[out] error > + * Error details. Filled in only on error, when not NULL. > + * @return > + * A valid handle in case of success, NULL otherwise. > + */ > +__rte_experimental > +struct rte_flow_meter_profile * > +rte_mtr_meter_profile_get(uint16_t port_id, > + uint32_t meter_profile_id, > + struct rte_mtr_error *error); > + > /** > * Check whether a meter policy can be created on a given port. > * > @@ -679,6 +699,26 @@ rte_mtr_meter_policy_add(uint16_t port_id, > struct rte_mtr_meter_policy_params *policy, > struct rte_mtr_error *error); >=20 > +/** > + * Meter policy object get > + * > + * Get meter policy object for a given meter policy ID. > + * > + * @param[in] port_id > + * The port identifier of the Ethernet device. > + * @param[in] policy_id > + * Meter policy ID. Needs to be the valid. > + * @param[out] error > + * Error details. Filled in only on error, when not NULL. > + * @return > + * A valid handle in case of success, NULL otherwise. > + */ > +__rte_experimental > +struct rte_flow_meter_policy * > +rte_mtr_meter_policy_get(uint16_t port_id, > + uint32_t policy_id, > + struct rte_mtr_error *error); > + > /** > * Define meter policy action list: > * GREEN - GREEN, YELLOW - YELLOW, RED - RED > diff --git a/lib/ethdev/rte_mtr_driver.h b/lib/ethdev/rte_mtr_driver.h > index f7dca9a54c..948a629b93 100644 > --- a/lib/ethdev/rte_mtr_driver.h > +++ b/lib/ethdev/rte_mtr_driver.h > @@ -41,6 +41,12 @@ typedef int (*rte_mtr_meter_profile_delete_t)(struct r= te_eth_dev *dev, > uint32_t meter_profile_id, > struct rte_mtr_error *error); >=20 > +/** @internal MTR meter profile get. */ > +typedef struct rte_flow_meter_profile * > +(*rte_mtr_meter_profile_get_t)(struct rte_eth_dev *dev, > + uint32_t meter_profile_id, > + struct rte_mtr_error *error); > + > /** @internal MTR meter policy validate. */ > typedef int (*rte_mtr_meter_policy_validate_t)(struct rte_eth_dev *dev, > struct rte_mtr_meter_policy_params *policy, > @@ -57,6 +63,13 @@ typedef int (*rte_mtr_meter_policy_delete_t)(struct rt= e_eth_dev *dev, > uint32_t policy_id, > struct rte_mtr_error *error); >=20 > +/** @internal MTR meter policy get. */ > +typedef struct rte_flow_meter_policy * > +(*rte_mtr_meter_policy_get_t)(struct rte_eth_dev *dev, > + uint32_t policy_id, > + struct rte_mtr_error *error); > + > + > /** @internal MTR object create. */ > typedef int (*rte_mtr_create_t)(struct rte_eth_dev *dev, > uint32_t mtr_id, > @@ -194,6 +207,12 @@ struct rte_mtr_ops { >=20 > /** MTR object meter policy update */ > rte_mtr_meter_policy_update_t meter_policy_update; > + > + /** MTR meter profile get */ > + rte_mtr_meter_profile_get_t meter_profile_get; > + > + /** MTR meter policy get */ > + rte_mtr_meter_policy_get_t meter_policy_get; > }; >=20 > /** > diff --git a/lib/ethdev/version.map b/lib/ethdev/version.map > index daca7851f2..2609f2e709 100644 > --- a/lib/ethdev/version.map > +++ b/lib/ethdev/version.map > @@ -285,6 +285,8 @@ EXPERIMENTAL { > rte_mtr_color_in_protocol_priority_get; > rte_mtr_color_in_protocol_set; > rte_mtr_meter_vlan_table_update; > + rte_mtr_meter_profile_get; > + rte_mtr_meter_policy_get; > }; >=20 > INTERNAL { > -- > 2.18.2 Best, Ori