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 B1F8141CEC; Mon, 20 Feb 2023 15:31:16 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5231E43062; Mon, 20 Feb 2023 15:31:16 +0100 (CET) Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by mails.dpdk.org (Postfix) with ESMTP id 2367D40395 for ; Mon, 20 Feb 2023 15:31:15 +0100 (CET) Received: from frapeml100005.china.huawei.com (unknown [172.18.147.200]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4PL4YS6jqbz6J9wZ; Mon, 20 Feb 2023 22:29:16 +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.17; Mon, 20 Feb 2023 15:31:14 +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.017; Mon, 20 Feb 2023 15:31:14 +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/K7SLcMAgACWeQCAACW00IADXHGAgAFhvFA= Date: Mon, 20 Feb 2023 14:31:14 +0000 Message-ID: References: <20230213113156.385482-1-tduszynski@marvell.com> <20230216175502.3164820-1-tduszynski@marvell.com> <20230216175502.3164820-2-tduszynski@marvell.com> <4b055bbc-36e5-671c-8117-fb0ee7307d55@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 PiA+PiA+PiBkaWZmIC0tZ2l0IGEvbGliL3BtdS9ydGVfcG11LmggYi9saWIvcG11L3J0ZV9wbXUu aCBuZXcgZmlsZSBtb2RlDQo+ID4+ID4+IDEwMDY0NCBpbmRleCAwMDAwMDAwMDAwLi42YjY2NGMz MzM2DQo+ID4+ID4+IC0tLSAvZGV2L251bGwNCj4gPj4gPj4gKysrIGIvbGliL3BtdS9ydGVfcG11 LmgNCj4gPj4gPj4gQEAgLTAsMCArMSwyMTIgQEANCj4gPj4gPj4gKy8qIFNQRFgtTGljZW5zZS1J ZGVudGlmaWVyOiBCU0QtMy1DbGF1c2UNCj4gPj4gPj4gKyAqIENvcHlyaWdodChjKSAyMDIzIE1h cnZlbGwNCj4gPj4gPj4gKyAqLw0KPiA+PiA+PiArDQo+ID4+ID4+ICsjaWZuZGVmIF9SVEVfUE1V X0hfDQo+ID4+ID4+ICsjZGVmaW5lIF9SVEVfUE1VX0hfDQo+ID4+ID4+ICsNCj4gPj4gPj4gKy8q Kg0KPiA+PiA+PiArICogQGZpbGUNCj4gPj4gPj4gKyAqDQo+ID4+ID4+ICsgKiBQTVUgZXZlbnQg dHJhY2luZyBvcGVyYXRpb25zDQo+ID4+ID4+ICsgKg0KPiA+PiA+PiArICogVGhpcyBmaWxlIGRl ZmluZXMgZ2VuZXJpYyBBUEkgYW5kIHR5cGVzIG5lY2Vzc2FyeSB0byBzZXR1cCBQTVUNCj4gPj4g Pj4gK2FuZA0KPiA+PiA+PiArICogcmVhZCBzZWxlY3RlZCBjb3VudGVycyBpbiBydW50aW1lLg0K Pi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