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 360E741CEE; Mon, 20 Feb 2023 18:21:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1BE15430AD; Mon, 20 Feb 2023 18:21:08 +0100 (CET) Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by mails.dpdk.org (Postfix) with ESMTP id CDE3A40395 for ; Mon, 20 Feb 2023 18:21:06 +0100 (CET) Received: from frapeml100006.china.huawei.com (unknown [172.18.147.200]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4PL8GG1HmDz6J7fy; Tue, 21 Feb 2023 01:16:22 +0800 (CST) Received: from frapeml500007.china.huawei.com (7.182.85.172) by frapeml100006.china.huawei.com (7.182.85.201) 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 18:21:05 +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 18:21:05 +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/K7SLcMAgACWeQCAACW00IADXHGAgAFhvFCAAFwJgIAAEWfQ Date: Mon, 20 Feb 2023 17:21:05 +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 DQo+ID4+ID4+ID4+IGRpZmYgLS1naXQgYS9saWIvcG11L3J0ZV9wbXUuaCBiL2xpYi9wbXUvcnRl X3BtdS5oIG5ldyBmaWxlIG1vZGUNCj4gPj4gPj4gPj4gMTAwNjQ0IGluZGV4IDAwMDAwMDAwMDAu LjZiNjY0YzMzMzYNCj4gPj4gPj4gPj4gLS0tIC9kZXYvbnVsbA0KPiA+PiA+PiA+PiArKysgYi9s aWIvcG11L3J0ZV9wbXUuaA0KPiA+PiA+PiA+PiBAQCAtMCwwICsxLDIxMiBAQA0KPiA+PiA+PiA+ PiArLyogU1BEWC1MaWNlbnNlLUlkZW50aWZpZXI6IEJTRC0zLUNsYXVzZQ0KPiA+PiA+PiA+PiAr ICogQ29weXJpZ2h0KGMpIDIwMjMgTWFydmVsbA0KPiA+PiA+PiA+PiArICovDQo+ID4+ID4+ID4+ ICsNCj4gPj4gPj4gPj4gKyNpZm5kZWYgX1JURV9QTVVfSF8NCj4gPj4gPj4gPj4gKyNkZWZpbmUg X1JURV9QTVVfSF8NCj4gPj4gPj4gPj4gKw0KPiA+PiA+PiA+PiArLyoqDQo+ID4+ID4+ID4+ICsg KiBAZmlsZQ0KPiA+PiA+PiA+PiArICoNCj4gPj4gPj4gPj4gKyAqIFBNVSBldmVudCB0cmFjaW5n IG9wZXJhdGlvbnMNCj4gPj4gPj4gPj4gKyAqDQo+ID4+ID4+ID4+ICsgKiBUaGlzIGZpbGUgZGVm aW5lcyBnZW5lcmljIEFQSSBhbmQgdHlwZXMgbmVjZXNzYXJ5IHRv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