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 C9C6041D91; Mon, 27 Feb 2023 21:53:27 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ABF5B40A84; Mon, 27 Feb 2023 21:53:27 +0100 (CET) Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by mails.dpdk.org (Postfix) with ESMTP id 7886540A7D for ; Mon, 27 Feb 2023 21:53:26 +0100 (CET) Received: from frapeml100005.china.huawei.com (unknown [172.18.147.226]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4PQXhq1Dpbz67CmC; Tue, 28 Feb 2023 04:51:07 +0800 (CST) Received: from frapeml500007.china.huawei.com (7.182.85.172) by frapeml100005.china.huawei.com (7.182.85.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Mon, 27 Feb 2023 21:53:25 +0100 Received: from frapeml500007.china.huawei.com ([7.182.85.172]) by frapeml500007.china.huawei.com ([7.182.85.172]) with mapi id 15.01.2507.021; Mon, 27 Feb 2023 21:53:24 +0100 From: Konstantin Ananyev To: Tomasz Duszynski , Konstantin Ananyev , "dev@dpdk.org" Subject: RE: [EXT] Re: [PATCH v11 1/4] lib: add generic support for reading PMU events Thread-Topic: [EXT] Re: [PATCH v11 1/4] lib: add generic support for reading PMU events Thread-Index: AQHZQi/0WtsdB195/EyIqAkaKgLk/K7YoA2AgAnj+wCAAMG3wA== Date: Mon, 27 Feb 2023 20:53:24 +0000 Message-ID: <2be9393cdbb94b9dad5bb7340ab9bca0@huawei.com> References: <20230213113156.385482-1-tduszynski@marvell.com> <20230216175502.3164820-1-tduszynski@marvell.com> <20230216175502.3164820-2-tduszynski@marvell.com> <5dfb1803-ae7f-5361-6453-70f767041928@yandex.ru> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.206.138.42] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-CFilter-Loop: Reflected 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 DQoNCj4gPj4gQWRkIHN1cHBvcnQgZm9yIHByb2dyYW1taW5nIFBNVSBjb3VudGVycyBhbmQgcmVh ZGluZyB0aGVpciB2YWx1ZXMgaW4NCj4gPj4gcnVudGltZSBieXBhc3Npbmcga2VybmVsIGNvbXBs ZXRlbHkuDQo+ID4+DQo+ID4+IFRoaXMgaXMgZXNwZWNpYWxseSB1c2VmdWwgaW4gY2FzZXMgd2hl cmUgQ1BVIGNvcmVzIGFyZSBpc29sYXRlZCBpLmUNCj4gPj4gcnVuIGRlZGljYXRlZCB0YXNrcy4g SW4gc3VjaCBjYXNlcyBvbmUgY2Fubm90IHVzZSBzdGFuZGFyZCBwZXJmDQo+ID4+IHV0aWxpdHkg d2l0aG91dCBzYWNyaWZpY2luZyBsYXRlbmN5IGFuZCBwZXJmb3JtYW5jZS4NCj4gPj4NCj4gPj4g U2lnbmVkLW9mZi1ieTogVG9tYXN6IER1c3p5bnNraSA8dGR1c3p5bnNraUBtYXJ2ZWxsLmNvbT4N Cj4gPj4gQWNrZWQtYnk6IE1vcnRlbiBCcsO4cnVwIDxtYkBzbWFydHNoYXJlc3lzdGVtcy5jb20+ DQo+ID4NCj4gPkZldyBtb3JlIGNvbW1lbnRzL3F1ZXN0aW9ucyBiZWxvdy4NCj4gPg0KPiA+DQo+ ID4+IGRpZmYgLS1naXQgYS9saWIvcG11L3J0ZV9wbXUuYyBiL2xpYi9wbXUvcnRlX3BtdS5jIG5l dyBmaWxlIG1vZGUNCj4gPj4gMTAwNjQ0IGluZGV4IDAwMD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