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 126ADA0548; Wed, 1 Jun 2022 10:51:19 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C47AA40694; Wed, 1 Jun 2022 10:51:18 +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 8B3E540689 for ; Wed, 1 Jun 2022 10:51:17 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=np9in2WPSX+yDLumElY7QeAQuh/dp9z3qZl53fwS8Izij/Cejb0Bn7tjN7MLPoIxDy4c1Cl6VN0UE4nQdQLM993Nkn+j7aQAvnqzkTC8oiX0qN4tnIzZfuYo1VHG3gh/n+YEk32evtnnkPB89DofjwKL0cw9d1GoD3iw9NHUIxC+lfKOh6sa5cK9pDi0rOYKUTk/TrlKD2AEgpVAWx3/ZDR84PEfZSyvMajCQ1dqXUXRWLOZoQ4yV+0sfIexhlXeGIhjQZcCa+uO7DaZ2qcAZGRW21xnWIXNmGNyo/iTP/6ZF4feDIpAwQamSC8r2h3rFjzFUSSCSLq0By2F8vERYA== 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=udvBxRj41aFQ3nhR3/D+qQRfwr4TzrxAtZ1n6OSh5BA=; b=QhDTu5XjzfCst8O+S/rYdpklAtx6BzzXc8Q2RaArsy+wnbF0xZf3e75RzupHrNka9lo4HADx/faAFJL0djOARmfQcVOTPLBb6JGSnmI+Eb6JIwkdRBWtNLQB+4rnLisYSh2NaC2HjXV24Kul2yoUvmys4S44pcuaADX1Xtzi2EHYRUiTdQHO27hOkmI84YnDf0vE24V8cSmZva/7SWjJ6+nnTYI7S5fT1Jc8KE3OTPuvFwH1aCJPRAxAJK36b0bx1Y1X3p4Wnbkqdmg8Kye8YYkT6F7IGmiaD3Qon9E1hcRLLOUrpgsrOkUUQcyT6z6QE2evX7b0k7SwgBewGKOHsQ== 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=udvBxRj41aFQ3nhR3/D+qQRfwr4TzrxAtZ1n6OSh5BA=; b=iVfkozHiiOe/P5kNuy1hf2AKcR9dx7VG6ACZjUbchERPkTKPM4ztz8HPHBssATOZJKJcpgeoXqG79T8dQ2sq/2qdEnjZA3c9//04ZrJscU/lP7+ealgSxhJQ1SB4/sO0kksBtLPVRFfdXoSrvx2Bf/4/uqVcmi53j4S0wzY++F/Ci/jk4+3gAHyzUIZhypKZkN7fLPQipe5HrTZAjOlCxmfzj9i13EvYbB9F00yOTFJg3hg5VnECmN5/6WLkYoptETiShzVurx//x9VFGM9cCDJCwPGTBLIt6jyEm/3wV811xtDbZQ4U5xSfRH8FN9sNL9V2vbWAbuAaOjcn3R4K/g== Received: from MW2PR12MB4666.namprd12.prod.outlook.com (2603:10b6:302:13::22) by BN6PR12MB1618.namprd12.prod.outlook.com (2603:10b6:405:b::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.12; Wed, 1 Jun 2022 08:51:14 +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.019; Wed, 1 Jun 2022 08:51:14 +0000 From: Ori Kam To: Alexander Kozyrev , "dev@dpdk.org" CC: "cristian.dumitrescu@intel.com" , "jerinjacobk@gmail.com" , "NBU-Contact-Thomas Monjalon (EXTERNAL)" , "ivan.malov@oktetlabs.ru" , "andrew.rybchenko@oktetlabs.ru" , "ferruh.yigit@xilinx.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 v3 3/7] ethdev: get meter profile/policy objects Thread-Topic: [PATCH v3 3/7] ethdev: get meter profile/policy objects Thread-Index: AQHYdWnsmN01s1KPckq/NT63QQlr9K06PpCA Date: Wed, 1 Jun 2022 08:51:14 +0000 Message-ID: References: <20220522105102.1692526-1-akozyrev@nvidia.com> <20220601034408.2579943-1-akozyrev@nvidia.com> <20220601034408.2579943-4-akozyrev@nvidia.com> In-Reply-To: <20220601034408.2579943-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: e76660ba-1d5c-4d5d-4134-08da43abe2a2 x-ms-traffictypediagnostic: BN6PR12MB1618: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: BGArDUei6w0w3Ek+2YLh7p6oma2nuX16bvGrwfbucdR9+4kO1DACgrRTV5+rxb9tYjZ72givDTmdoEYN8pe9DZnZ3hfxhIepRMVkelrOxmNs+NDvBWaPVl+4VZWIUaniB3zVEnEHsWYWqgwVOUUi9elIdhCzjiTfQxiLgfJYXsgK8tbOs2IbpgluRrO5ELjmVeVaaGLVuMwgWCcVvonra5c2jDP6KXdfaqN1k23Lf0PieRHsGnkI5BSsjM89d/477ZCTlvOU4BNTjASyLmEsIfX7vbV5UptnB3Ir4O4FKuibMJJevABXzopu0oRQaOZYtxS/LWSLMf9hCbqTG2k2NkhDFvE+dt8trA0wdQg4Dq3hXeTxI5RfS2/ZUJeRJHd2prnVBYWUBYW2NkrO/dhKMtYv3VNkCPRX+fvs5/eWaXtnFAtT2UCDQu8vpgzxfF3c2WeLy4b0r2Vz7PxL+q+5dq2l5VtVNft+645udeagwPsjOHzYeJ8e6hRKMiYLqgDN1yzRoXnLlQmh5y4Q6sgWV/AB+LAp9B+yucgfDx0GFR+03P/KtFploLGfuvBxh2QbTksi59rz9u6XsmcUIJFjJJ0c/lstqnZiQxsGjK3JHGGIP60cHZVYd+BrjvWszz+YrwnuU/C//s6QtRU03sQCPIjbimp7gLFwNk44t70D4DH1uGkoA8emR5JuTuhP89Cg9pizLc9/2LUFF18IHT7Qrg== 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)(83380400001)(38070700005)(122000001)(2906002)(33656002)(186003)(38100700002)(7416002)(52536014)(6506007)(508600001)(7696005)(5660300002)(86362001)(53546011)(8936002)(110136005)(54906003)(316002)(4326008)(71200400001)(26005)(66946007)(8676002)(66556008)(64756008)(76116006)(66446008)(66476007)(55016003)(9686003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?wLQzlXRRHcg5T/eMbwfd///GrjG1hFkhiQFTxVjzqDGVeafqNoqIzGLNvxKa?= =?us-ascii?Q?w98c5PpJL1tvK2gckH7wCOhOvyKXSyCH4qCQyEVtCh84XziJZadpaYsnb44u?= =?us-ascii?Q?AvqeZgU2upU3qJn46oHadT6a8BITMf2wG5b3qXBhog1Sx5TYOK8XX4DLRE61?= =?us-ascii?Q?yYIXjFg+mLj1eSZxztIyzhST9p36ZmmlkgeYSfQXzs7BEl3GBX1wFBAn/rv+?= =?us-ascii?Q?2OtKJ33F7iLP6zj2pkieo6BT50UWjlzVfQgcmPbp7fwGtJiGlMC80EzSjnPo?= =?us-ascii?Q?x5xugbexPwjzZAUiVSzvSz4gBbsm2LteCNsWSQQtRILZ8G7ZTekLjB8iioyA?= =?us-ascii?Q?yOi9qmzRu40H76ibzB8EndLinMpzsVGoQaZnE9VRg0VNvGvMW1DmLvyMk3LZ?= =?us-ascii?Q?tYlAGzmgAb74XMw1Aw1RFgXsiBovZNfnOMm8jQ5LRiSHWlFAAwNwXUKpyePr?= =?us-ascii?Q?5XIeWpcSNy9/qouvoCQQN8DRm4B8XOPHrBB9YfaSaPLX/qtu/oKm55s+6ZZ6?= =?us-ascii?Q?f3zsZalPbDYE2x/qF/zTKG5M3I0Rs7eRnnEpV9ZXDICW9HdZimb5mxNrDk91?= =?us-ascii?Q?juiO09RSKdyMu2PhCTiJMLrTborfd1Eai9ohWtJ2xNb/2l6fa6UVrF+CubTZ?= =?us-ascii?Q?UcbAKioZlvbyly2saE5FStVJVJLd1vVDecVGURUsgg6YKg/JiiUuna7Lo44+?= =?us-ascii?Q?Sc0XSP2Gb9OxJ2xgS18tn4arBsCQzQZD82NezqJ6H11KROp/z9PoNx0yDU95?= =?us-ascii?Q?WIfwZaGBUJb1P28W03LCipi8wXvzynQBsgm6If40yGEgHzz7TCZB2K8p0WMj?= =?us-ascii?Q?LfwsUrM3CuGXqFNhsDp1YcP8tLskLxzq/ECJoDku4rCTGFK0NNnmbK8miOb8?= =?us-ascii?Q?YzVI+4NbP3GD6vWjZBIxhNOfs2sQFdP0ixjvK016TcC/1vKaj+DAll1SLw26?= =?us-ascii?Q?tDzoY6Tb9LVKPTpxGey9b4aAecpjQwJ78IzDCWmPMep8/gnAAD53d23b7uVi?= =?us-ascii?Q?1WfWYXNJVwkQkK+NrOOG5iKtU9u85uIwofVTXoSPs7vqGUnab95jsJme7nQL?= =?us-ascii?Q?i4b0x0Cq3IoVEPuUMFTCJ29dNBY6/6lLMJex5cMTYQ/anKwUjA2mbN2FgGlK?= =?us-ascii?Q?O1CSP6JbU+yQ3LHwCn4hmGBDy7D+HJFPEwLO4go8+isZJZhIuoFVW0iq4iFW?= =?us-ascii?Q?Shho7KL9BO4a4ouwcvgszQ5HF1DH9wIuVCMQq3lTVGuOZQ2PzqjNkLCtd+zv?= =?us-ascii?Q?rsgRQ7nmB9YfcgyjcvL/jznprVyIA6gAQwmckAAkV5Kl3Ya0d3EQAVmezqJ/?= =?us-ascii?Q?Q/p1iyy2Z3w+hgGRmI2vw3rRTXjAlhOBh4a5NX6uZ+cs/50lZi7FyfAfVzS1?= =?us-ascii?Q?TOpWFjHB1qJpCP6/V0+eMBL4xj4Tcq1QBe2tNeyvm9ef0bEjixTOT9nLNcUP?= =?us-ascii?Q?p5ecVw+vjakzpDAogq/xmsVJSvQ3W1WhkHf4K6e0EeYNXzjUwpiGLP3aBrT0?= =?us-ascii?Q?oZgZSsHZx4pVfJ8tQ70FbYeS8Cdl00ihgje/5whbpWwMJS1JbrDZv8OBQhpT?= =?us-ascii?Q?Yjw8joaKw7ONMMB6eBd4GdOAhmTWXvCUFFbNLUXeSYXWz9+HyhJ4B8GSsKao?= =?us-ascii?Q?0a39DEZbS4WcVwvZEOQWWvRrBuJMxX+KXuOLuGe0qPMsRttgnbYURBW/0maL?= =?us-ascii?Q?kLMDDwo3T6AkRex98wl5Oyw+DGNT+kPdLZ5bKEYef7cd6cHf?= 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: e76660ba-1d5c-4d5d-4134-08da43abe2a2 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Jun 2022 08:51:14.6630 (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: Bg173d3dCzjDJ6BlFLXRvQWAM6t628Je4/rFWQsCXDfn7sSYjAnbObzpVd0WZ3Fe5lkzv7OD37eugTeamMLdsQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1618 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: Wednesday, June 1, 2022 6:44 AM > Subject: [PATCH v3 3/7] 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 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. > Pointers are destroyed and cannot be used after thecorresponding > meter_profile_delete() or meter_policy_delete() are called. >=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..2ce3236ad8 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 policy definition to providei flexibility > + to match a color later with the ``RTE_FLOW_ITEM_TYPE_METER_COLOR`` it= em. > + > 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 Acked-by: Ori Kam Best, Ori