From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E50FAA0540; Wed, 15 Jul 2020 06:19:03 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 88FC91C1A9; Wed, 15 Jul 2020 06:19:03 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 70ECB1C1A7 for ; Wed, 15 Jul 2020 06:19:02 +0200 (CEST) IronPort-SDR: LTbkbZBrwHnv5+ZuSEJ9XXWJDqBnBr62Yh9JySo+8ep4WvTWL1ZVd5dd2ULQ7GClbDHZRWT3Eg 6jbYQT/iMlhg== X-IronPort-AV: E=McAfee;i="6000,8403,9682"; a="129168778" X-IronPort-AV: E=Sophos;i="5.75,354,1589266800"; d="scan'208";a="129168778" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jul 2020 21:19:01 -0700 IronPort-SDR: 2GCVvrY7d40AAitTSimvW+9HArU+trAcrsiNHNDN9iMDZNcQ0/NTumsDRtkJ079Yti3Y1T2n8u 8r0QbZcCdhPg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,354,1589266800"; d="scan'208";a="285981366" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga006.jf.intel.com with ESMTP; 14 Jul 2020 21:19:01 -0700 Received: from fmsmsx118.amr.corp.intel.com (10.18.116.18) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 14 Jul 2020 21:19:01 -0700 Received: from FMSEDG001.ED.cps.intel.com (10.1.192.133) by fmsmsx118.amr.corp.intel.com (10.18.116.18) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 14 Jul 2020 21:19:00 -0700 Received: from NAM02-CY1-obe.outbound.protection.outlook.com (104.47.37.59) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 14 Jul 2020 21:19:00 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JXqNSRPUftl2kGm9HZSEo5CThiJpLkqHa+4Jueg/4QZal8rZzSTXfYa0TOMvSrXX/PjRyS6IXaZM0IQO2v1n+wBGkfrrgTsbsgqX08j8YvGxTNXM+Mkzg70ckWGK6eV48pY0ykVfF2fSbb30JSLxSAwxYSumzZbLNZSmzKfTLPGR0lk/ZHz1C07tTvuh+e+iqNZymToEb1xbYHcIeR4wq5xsJt9I5Hw3kdSZXx5ftuEFVxzrD5WvXUFlPHnEhUFMfWevFS+yFP1MZYg43qK8bvnFn4sPBCb2wNebg8zPNnWq3p7HY1QHWcAa2rzeLYDwRt5iUzlUKhj2anDqalpHtw== 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=NYL8Lr899LlTYc8t3cS2E7nBQVmM1/eZcUdfoxrm+xw=; b=j3FmXwy2huTESIN97Ol1mEq4xytKlt2fx54nEi7jRpoh55MWWGkQmNLCCa6ib6XiAbknucpeuqVf6eBS04Vd8GCTJM2ZausstKg9zTaQ4jOKA1QYmOJ+l4sYbkRSIeszufsRu+40jWRAm3jYAI+IjI3kLUflP5eSqchldSc53gmBJyloz7X8dgHMgn8DtXZW0TjVcjwqw0SegypCQ9UKBZFSzC/BbIWu4Z78vEcQodGKf1CwqNyj0L36vLpqXBLZnAWHmTilICo4KcwUE1mOm3mjMtSQIpLVXdqpFp6UhPLq4E+ai6q49ZSo7jyHJvDlNHx2I83nZzVbJNgMbDCyqw== 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=NYL8Lr899LlTYc8t3cS2E7nBQVmM1/eZcUdfoxrm+xw=; b=jX9QCE1ZrJnbvzZpRRI7R7QnURvisDvpVbIkn78lE51i+BOfnWYhWGOpfYrvvn+Jr16y7BFLyqCWWJbAOq2vNodVNbiGL7lR6Yrfkbxp/PzvMioItsGJIbi/fsf14aOQmrC3FJVELNMLNyzpb2mf2zQsWxnQnKYHBY/Fw9qujqw= Received: from BN8PR11MB3715.namprd11.prod.outlook.com (2603:10b6:408:85::13) by BN6PR11MB3937.namprd11.prod.outlook.com (2603:10b6:405:77::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.22; Wed, 15 Jul 2020 04:18:58 +0000 Received: from BN8PR11MB3715.namprd11.prod.outlook.com ([fe80::1174:140a:4a28:2cfe]) by BN8PR11MB3715.namprd11.prod.outlook.com ([fe80::1174:140a:4a28:2cfe%4]) with mapi id 15.20.3174.025; Wed, 15 Jul 2020 04:18:58 +0000 From: "Ma, LihongX" To: "Burakov, Anatoly" , "dev@dpdk.org" CC: "Hunt, David" , "Pattan, Reshma" , "Richardson, Bruce" Thread-Topic: [dpdk-dev] [PATCH v3 1/2] power: fix power management env detection Thread-Index: AQHWWcnYMqOb/pMDa0GN4V8ddhiwJKkICS4A Date: Wed, 15 Jul 2020 04:18:58 +0000 Message-ID: References: <42bebf7cebd2b635a60b626faf605df6d8a277c1.1594652063.git.anatoly.burakov@intel.com> <7fcd224245cddd24d5457f1d6ba29c563006c4d6.1594722597.git.anatoly.burakov@intel.com> In-Reply-To: <7fcd224245cddd24d5457f1d6ba29c563006c4d6.1594722597.git.anatoly.burakov@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.147.193] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: cf6d88fe-1fb9-4073-eb44-08d82876325e x-ms-traffictypediagnostic: BN6PR11MB3937: 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:510; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: XY+NYZaggbj07dLHC2V7jqEEg/siz5apJzf+prlYLS9kdJ3dpwQAFmC5lA0ApE2ayE5y0A1+3F5iO28WkhWmFXFYk5RRtbAobw3D3Bw6oKDWLzislsSCNNgWUZztd1Rs3GugK9Jxc7oRzTXvQBXGqZqDXPcHYmR4cuVIjalosAVvd3+PY7w/goHsRLD5Dffjg+Yw/tWszyDwW87pzvp2vV4Dpx4mTeLDaCknVphFuHzma9fOZHAgjhAec+vp8jOocK32cGk/F8Bip0/twAcza1ploGompkFxP8auGWXXQuwUoQq9N1FSjBEQaUOQ+ZvoB//S8AJUbPoeIcH+/lFOvg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN8PR11MB3715.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(346002)(366004)(136003)(396003)(376002)(39860400002)(478600001)(2906002)(55016002)(4326008)(7696005)(4744005)(33656002)(54906003)(71200400001)(5660300002)(6506007)(53546011)(110136005)(316002)(8936002)(52536014)(8676002)(186003)(83380400001)(9686003)(107886003)(76116006)(64756008)(66946007)(86362001)(66476007)(66556008)(26005)(66446008); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: 0x031t8P2EmeOpXkPCMfAU4EbwrO39evi+gJmUXzCdqZH6tnN9RjL1L0nk2eKL8ashP1APt8jcKYNDfLqApxDyrbybeXjMX4R8aBnJaZEBb/XW7dBgaYULug8FCVVEJ4JwU29moTmgz6V+hkLDeDYbznuz8qI+wlxVP6rgUnLBIT9p4n9OIAm3IR7M9h8DNIc1ZlNcWliUb0lFY8OAqNwpKNlc7MyxnINlrFjgsqBy8Gkl4WZcPiNFmKTCuKjsH/e42jBw5D29bEKRigDbRg9m5u+4Z5y1Ry7dAGeA4X+zp+FU4aBwn/eK6Qx5Zc39WMVcsK43ujzNCYjN+tm0pN7yVUTdNWQADb3ZEXziRRKIk8WO5DTyUm+FFOsgFNug1kodpgJGkCk3R0C3GFX2vYNi53xMe9cL0xnidk2hrKRbLBAx2dZyZzaTC43peKJWPGJFrPZuQND9zLtcpe0DEh+aiKP5pPAKnG78hi7ZlbhYcMEeBetdH1gqkC4rO9/BW5 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN8PR11MB3715.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: cf6d88fe-1fb9-4073-eb44-08d82876325e X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Jul 2020 04:18:58.7719 (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: rDuCsyqRq8RiWsJ20yuen1DSt9v/EcVJGLw+zkHP3gIRsTDwCR8xRdDtK2pal6ozOPCHqc8I7Ggx9b1vEmNPkg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB3937 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3 1/2] power: fix power management env detection X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" Tested-by:ma,Lihong Regards, Ma,lihong -----Original Message----- From: dev On Behalf Of Anatoly Burakov Sent: Tuesday, July 14, 2020 6:30 PM To: dev@dpdk.org Cc: Hunt, David ; Pattan, Reshma ; Richardson, Bruce Subject: [dpdk-dev] [PATCH v3 1/2] power: fix power management env detectio= n Anything coming from sysfs has a newline at the end. Cut it off before comp= aring the strings. Fixes: 20ab67608a39 ("power: add environment capability probing") Signed-off-by: Anatoly Burakov Acked-by: David Hunt --- Notes: v3: - Check if last character is really a newline before removing it =20 v2: - Fix potential integer underflow lib/librte_power/power_common.c | 8 ++++++++ 1 file changed, 8 insertions(+)