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 5F080A034C; Thu, 22 Dec 2022 13:41:03 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EF178410D0; Thu, 22 Dec 2022 13:41:02 +0100 (CET) Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by mails.dpdk.org (Postfix) with ESMTP id B93CE40FDF for ; Thu, 22 Dec 2022 13:41:01 +0100 (CET) Received: from frapeml500005.china.huawei.com (unknown [172.18.147.200]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Nd8vV3fndz6HJ5h; Thu, 22 Dec 2022 20:36:54 +0800 (CST) Received: from frapeml500007.china.huawei.com (7.182.85.172) by frapeml500005.china.huawei.com (7.182.85.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Thu, 22 Dec 2022 13:41:00 +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.2375.034; Thu, 22 Dec 2022 13:41:00 +0100 From: Konstantin Ananyev To: Robin Jarry , "dev@dpdk.org" CC: Tyler Retzlaff , Kevin Laatz , =?utf-8?B?TW9ydGVuIEJyw7hydXA=?= Subject: RE: [PATCH v5 2/4] eal: allow applications to report their cpu usage Thread-Topic: [PATCH v5 2/4] eal: allow applications to report their cpu usage Thread-Index: AQHZETg+b5I9s964LUWiukWNHOQG76554dxw Date: Thu, 22 Dec 2022 12:41:00 +0000 Message-ID: References: <20221123102612.1688865-1-rjarry@redhat.com> <20221216102109.64142-1-rjarry@redhat.com> <20221216102109.64142-3-rjarry@redhat.com> In-Reply-To: <20221216102109.64142-3-rjarry@redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.48.146.238] 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 DQoNCj4gDQo+IEFsbG93IGFwcGxpY2F0aW9ucyB0byByZWdpc3RlciBhIGNhbGxiYWNrIHRoYXQg d2lsbCBiZSBpbnZva2VkIGluDQo+IHJ0ZV9sY29yZV9kdW1wKCkgYW5kIHdoZW4gcmVxdWVzdGlu ZyBsY29yZSBpbmZvIGluIHRoZSB0ZWxlbWV0cnkgQVBJLg0KPiANCj4gVGhlIGNhbGxiYWNrIGlz IGV4cGVjdGVkIHRvIHJldHVybiB0aGUgbnVtYmVyIG9mIFRTQyBjeWNsZXMgdGhhdCBoYXZlDQo+ IHBhc3NlZCBzaW5jZSBhcHBsaWNhdGlvbiBzdGFydCBhbmQgdGhlIG51bWJlciBvZiB0aGVzZSBj eWNsZXMgdGhhdCB3ZXJlDQo+IHNwZW50IGRvaW5nIGJ1c3kgd29yay4NCj4gDQo+IFNpZ25lZC1v ZmYtYnk6IFJvYmluIEphcnJ5IDxyamFycnlAcmVkaGF0LmNvbT4NCj4gQWNrZWQtYnk6IE1vcnRl biBCcsO4cnVwIDxtYkBzbWFydHNoYXJlc3lzdGVtcy5jb20+DQo+IC0tLQ0KPiB2NCAtPiB2NToN Cj4gDQo+IFRoZSBjYWxsYmFjayBub3cgdGFrZXMgYSBwb2ludGVyIHRvIGEgcnRlX2xjb3JlX3Vz YWdlIHN0cnVjdHVyZS4NCj4gSSBjaG9zZSBub3QgdG8gaW5jbHVkZSBhbnkgQVBJIHZlcnNpb24g dHJhY2tpbmcgbWVjaGFuaXNtIHNpbmNlIHRoZQ0KPiB1bnN1cHBvcnRlZC91bnVzZWQgZmllbGRz IGNhbiBzaW1wbH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