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 7693DA034F; Tue, 8 Jun 2021 07:48:01 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 049EF410E7; Tue, 8 Jun 2021 07:48:01 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 090A44013F for ; Tue, 8 Jun 2021 07:47:59 +0200 (CEST) IronPort-SDR: QOSD7nFFIRDMl1/rRTBpvf/JaU8ajXoSYjM6nHF+tIpFxSB5dvadKmXi896Kq/XlgytkkiizSs dkGTmjxFxugg== X-IronPort-AV: E=McAfee;i="6200,9189,10008"; a="204799739" X-IronPort-AV: E=Sophos;i="5.83,256,1616482800"; d="scan'208";a="204799739" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jun 2021 22:47:58 -0700 IronPort-SDR: AnU/3Ah3gw21tSIcEhdeHqaSCbv+HmwQ67SMjpSXQ0Ltd9/qgsAPSFE70L/9Mf2Eb0MkPPbvdL An9ZfY8DTb1g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,256,1616482800"; d="scan'208";a="469364584" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by fmsmga004.fm.intel.com with ESMTP; 07 Jun 2021 22:48:00 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Mon, 7 Jun 2021 22:47:58 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4 via Frontend Transport; Mon, 7 Jun 2021 22:47:58 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.173) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.4; Mon, 7 Jun 2021 22:47:53 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oSN03tX5/ddXd0Uj2L0SARbj+vzwOzoGKUcAnlOWa7/2eJz0pr7jYnk0TjOzcOUGr571hN3e/35ISJaSS+ZFGUZsiS8UJS5XjMorz0BxVNdlKeFXOeC5r8L/zgAIUCBP3ljLmroGayV0lT0JN6na4VSypkGbkbYbCHjedeDz9bR2XPa/Ixpid0nf2ccNCMEpVQAuurEBz/zF0s1Uey4H2OV20Wx1knv8eJClktAOlLBbuOXES+ybqPc0sPBieAGq8UmUNjN3Nvt1NDjwxZkymM8oOLGRBI+BvRdxBFls+UJ0/4sh9HxfPvZLMf05DScLq234veVacbcr66GiTjUc7A== 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-SenderADCheck; bh=+LXlRWI7U896ScWrdFe2C8YLzBfvPkvuiXLFMK+Qsgw=; b=RUaXngRv8fLBx9WerdQbB4tDISa34xFoCqcGm/APT4Im+1UKrJtm4k3VtI2KMiEqfXPLsa8FelyvEZzC2QQ+i3JnTcCIMM45s35aNF7vOpkDAP9t7EGoBx/7hoMeSgCj5dzDsMaeUApH5IbCAPCGuIncCd9CYiD7C3uE7fYunw23z1k3TGCXhLhkhpVU5RWCAPyEb9bS2W4TUrijiQaaiwNS22/NCs+6ONjP7NIom25axujeZMmovmtg6vSXCgafJsYGnsG5npDKpZb1lSY8/g+HyICOw0KJ1l0lhWELHnEXe24LBUtaF7MuQ6ullcXP9jGT4L1SAoV3QVKnTHkSYw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+LXlRWI7U896ScWrdFe2C8YLzBfvPkvuiXLFMK+Qsgw=; b=Bl2JrJ00JO8WL8RNcTcCiug4uCtSVSAQWeFhOgHAawpb+YBL5qmd7IZDpYNUQQ7ZHg4QHfLjnUyTniiJRrBBB8q3pp/sPjti7iO6i5+75DlH3xIhnqVXNrBfu9XDDYdIDYnN3p4Sr5fsawlrwvJ0WeihlqBSELR4kCMkLMXFE7M= Received: from MN2PR11MB4063.namprd11.prod.outlook.com (2603:10b6:208:13f::22) by BL1PR11MB5336.namprd11.prod.outlook.com (2603:10b6:208:316::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4195.24; Tue, 8 Jun 2021 05:47:41 +0000 Received: from MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::6d37:7bdb:fdf1:e9f3]) by MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::6d37:7bdb:fdf1:e9f3%4]) with mapi id 15.20.4195.030; Tue, 8 Jun 2021 05:47:40 +0000 From: "Xia, Chenbo" To: Stephen Hemminger CC: "dev@dpdk.org" , "thomas@monjalon.net" , "Liang, Cunming" , "Wu, Jingjing" , "Burakov, Anatoly" , "Yigit, Ferruh" , "mdr@ashroe.eu" , "nhorman@tuxdriver.com" , "Richardson, Bruce" , "david.marchand@redhat.com" , "Ananyev, Konstantin" , Tiwei Bie Thread-Topic: [RFC v3 4/6] eal: add a helper for reading string from sysfs Thread-Index: AQHXVqhQz5YiNzOl7UKZCBBOBPW1FqsJpiQg Date: Tue, 8 Jun 2021 05:47:40 +0000 Message-ID: References: <20190715075214.16616-6-tiwei.bie@intel.com> <20210601030644.3318-1-chenbo.xia@intel.com> <20210601030644.3318-5-chenbo.xia@intel.com> <20210531223743.41a21fdd@hermes.local> In-Reply-To: <20210531223743.41a21fdd@hermes.local> Accept-Language: en-US, zh-CN Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: networkplumber.org; dkim=none (message not signed) header.d=none;networkplumber.org; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.55.46.52] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 65a058e1-7966-4eab-791c-08d92a40ee0b x-ms-traffictypediagnostic: BL1PR11MB5336: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:901; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: kfi7/0lsD5goY3rX47XMIatExiD0uowWLJk5KQCBKPw59azpdVaXPHMzDmrBvMQTmdXUzXa2SrkNBK6IjofdWQv+RN0fxecJ0aeNwpfodlt4HgDEyMowfPLgOIyqn5XbXe2VBPsKrvYDSIxUr2KAyXylUFOQKgHoZPnvraKWR/bHSAcvvRxelZgQXzy7qttMroqBLPjWPlwXDMGokwcfvg7uwgKrn8RgxM+zfd0LcYA9Bzr+QDFRJ/kHIfdk3j4MtRs39UWVwl4Y3bVOCeG+ZYRFPux19+Xv+/PddDRVoSlmMH9gRA69UVlQQsEYJhehvklobmYHBgZ2xCNi8QDJJkZQo9t+9CNDlkGsXRGtMByGTMrgmDPj3PKcmy99mjD5Xj6oTb/FEDR7Wfitt7o+cX/wpEbn9Qy/KluRxGw9Q9YjUOzqXUwR3rdDL9J/Ysf7yhSC1uX4363e/he5gklYkRROCUaJJfw6L5aVqYMxgjPeG7jFy0a1Jo33rFfHvtyKFCp/I8DGzsaRi6B0+DUKvSQ/+/A1D5MqUwLfbN4SpW3AkzoH+iL6ersa2amaMzUybJKaaiU+tDEncmKSUXkPdFnwx6TR74aWDZ+cotn1Z88= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR11MB4063.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(396003)(136003)(366004)(376002)(346002)(39860400002)(38100700002)(122000001)(9686003)(55016002)(6916009)(5660300002)(66946007)(64756008)(52536014)(76116006)(71200400001)(86362001)(66446008)(2906002)(66476007)(83380400001)(33656002)(7696005)(53546011)(66556008)(8936002)(54906003)(316002)(8676002)(107886003)(186003)(478600001)(26005)(6506007)(4326008); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?B?UytIZVBrWk9xUVl6T0xJTE9PT2d0c0thd2xyTFlNUzlvNDBjSnRsSHN2MWc4?= =?utf-8?B?NHlXVXphckJQSUdXSlEyVGFrRkhxLzdLRG5mSXNya0h5NnVsWkdnblczK1hH?= =?utf-8?B?TlZGanptc3FVUllEUytrRk50THZBdEFjTG5CWW9FdTBMS1U4UEZaUWxaSDlT?= =?utf-8?B?SHd0d1pzZ0s4U1kzM3FyTVhQWjhEdTV1b1hQWS90Yis5WGZad2VrbzVzUnp1?= =?utf-8?B?bm9nVHU3cThTeFlXeTBqZmhmaFV6RDI5TmpDeUY4M0tMLy80RU9PdkI4VEg0?= =?utf-8?B?by9DWlptNnBWUzdMa2k5RCs3dnhNWlhQbDNFa3dZbUdlS1VIR0c2TEJvL0hu?= =?utf-8?B?QzcxaEVsc3dKQlMzVHpwSUw1UC95N095TjV6OU9FWHZGcmV2MFBXSDZHTDdw?= =?utf-8?B?MzhBdGZsODRqY2FJNHM1ZElScTRNdjdsWnpSZGhxa0dib1l4SVljWTg2T2RE?= =?utf-8?B?Yzc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f-8?B?QndzQ0FmZW95emtaQ3dGYnNBcTlVRVpDWVhUcEVFYTRQSmIrZ0hTRGVWYVA5?= =?utf-8?B?ZVp4TkNzMjNkdWpmd0N1eHkzQzI2RHloZUNENmRkSnNMSjNSb2NGMXd4bEtl?= =?utf-8?B?czVWOW5kM1ZlL0lSZVV5cmFKSGp2NmJodnc2Lzc0TkNXSXkrUER4VkFEcWFB?= =?utf-8?B?T0VDMWZ1YWp1cWxoTDlHek82aHE4Q1ZFV3pJb2xxRk1wMkcrTnU3SURPRDdI?= =?utf-8?B?d0hoSlh2b1RiMHpGVWRUN21yaDJKVVNtL0RLZ25tZ2laaDF2OW5wNHRZTGZl?= =?utf-8?B?ZCt3ZW9pYlFWVXEwWGZlRzlDRGp2Y2hQYUdVY0tDQmtkZnd4OFk5ZHlFQ09u?= =?utf-8?Q?zsxBehTga+pcLLYf/M=3D?= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN2PR11MB4063.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 65a058e1-7966-4eab-791c-08d92a40ee0b X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Jun 2021 05:47:40.8518 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: C22WDW1WZiyRrSiZC8oaluM00pB9qKTu7pU8EWUd1ro/SK+XqY4eybSJd5yzPtt++nU3Te1j5OfpxkJxVQxXHQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR11MB5336 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [RFC v3 4/6] eal: add a helper for reading string from sysfs 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 Sender: "dev" SGkgU3RlcGhlbiwNCg0KPiAtLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBTdGVw aGVuIEhlbW1pbmdlciA8c3RlcGhlbkBuZXR3b3JrcGx1bWJlci5vcmc+DQo+IFNlbnQ6IFR1ZXNk YXksIEp1bmUgMSwgMjAyMSAxOjM4IFBNDQo+IFRvOiBYaWEsIENoZW5ibyA8Y2hlbmJvLnhpYUBp bnRlbC5jb20+DQo+IENjOiBkZXZAZHBkay5vcmc7IHRob21hc0Btb25qYWxvbi5uZXQ7IExpYW5n LCBDdW5taW5nDQo+IDxjdW5taW5nLmxpYW5nQGludGVsLmNvbT47IFd1LCBKaW5namluZyA8amlu Z2ppbmcud3VAaW50ZWwuY29tPjsgQnVyYWtvdiwNCj4gQW5hdG9seSA8YW5hdG9seS5idXJha292 QGludGVsLmNvbT47IFlpZ2l0LCBGZXJydWggPGZlcnJ1aC55aWdpdEBpbnRlbC5jb20+Ow0KPiBt ZHJAYXNocm9lLmV1OyBuaG9ybWFuQHR1eGRyaXZlci5jb207IFJpY2hhcmRzb24sIEJydWNlDQo+ IDxicnVjZS5yaWNoYXJkc29uQGludGVsLmNvbT47IGRhdmlkLm1hcmNoYW5kQHJlZGhhdC5jb207 IEFuYW55ZXYsIEtvbnN0YW50aW4NCj4gPGtvbnN0YW50aW4uYW5hbnlldkBpbnRlbC5jb20+OyBU aXdlaSBCaWUgPHRpd2VpLmJpZUBpbnRlbC5jb20+DQo+IFN1YmplY3Q6IFJlOiBbUkZDIHYzIDQv Nl0gZWFsOiBhZGQgYSBoZWxwZXIgZm9yIHJlYWRpbmcgc3RyaW5nIGZyb20gc3lzZnMNCj4gDQo+ IE9uIFR1ZSwgIDEgSnVuIDIwMjEgMTE6MDY6NDIgKzA4MDANCj4gQ2hlbmJvIFhpYSA8Y2h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