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 6AC38A04B0 for ; Thu, 26 Nov 2020 15:46:42 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3AEF8C9B0; Thu, 26 Nov 2020 15:46:41 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 5590DC988; Thu, 26 Nov 2020 15:46:37 +0100 (CET) IronPort-SDR: pIWPua0sqaTA4RD0tXn/RK5LjqeB/YFtTr7GnAQ9gPwxels7EI0XX5PiT+yL4qIfhxPIoCOsIg hbuXyjB6+QGg== X-IronPort-AV: E=McAfee;i="6000,8403,9816"; a="160065332" X-IronPort-AV: E=Sophos;i="5.78,372,1599548400"; d="scan'208";a="160065332" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Nov 2020 06:46:33 -0800 IronPort-SDR: nPcLVXasznoQPq68ApsNBZWyuxnWMhBiUuoyaEhX9cEG4FN6kPP/Q2FVl1Y0x8n/bQ6/bzgEEv /BmlHo+BdUSw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,372,1599548400"; d="scan'208";a="362829249" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by fmsmga004.fm.intel.com with ESMTP; 26 Nov 2020 06:46:33 -0800 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) 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.1713.5; Thu, 26 Nov 2020 06:46:33 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 26 Nov 2020 06:46:32 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Thu, 26 Nov 2020 06:46:32 -0800 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.174) 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.1713.5; Thu, 26 Nov 2020 06:46:32 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JhWoXEigqz6juoiXsVZOOskt+Kl/m1KN+OrcEbwobFRSTc3wx9a2OhKbvA7SZXKaXumcq/gmd3ptiJNedrrlooqJKhQL8RwDRsZLa2DD11gmaGTqsk5dAnBsxOku180h8bAotN020bgxlEgcjCaO9s44f9DBiCpUg9xJh3E1IqlrlQMosmNKUbrZsfzyQ76QIwpUoLIETrcJNmgSyme4G6Eb/8HJ6Iw877todT/izwJDc6/dbHquDbFN74nAP4WSRFmHzQZL8tF+iQu+YaIw5e/ATMS/LahvjSlNvYm2BsF5JSo6ZPZTUp2tejMJSTIXEpz/hxf+Qw1B4XSzGMgwUw== 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=v0I/rCDsHnbKqRKZZmLu9rpvFpNzbHGzH0q0wIfJyEI=; b=FFBQZ/pGy03UVfNBxnWdhebyorR7ThQahu8tIBxmSiYUUrKr+LL2j+TkhDgWhjDNZKIWvjsOHjUsebz2QQVoI/Ip8cuwbi412ukH2b6FqZVRjF5PIa6YSP0LbqZIzURWTYImI3p2HX5M4P89D9RGLIL/OG83kE5XVGrxMnAeY2ntwuSi3QXJvbOriwprWA8Kb5u5UJg0vU79He/NgiRoGnbkXAIb2T0yIGfLadq5e+724ms2TYfWInmwTl1Q4e3eqZ0wMpEVe9S4MwqdXRtJAhbixE+G9lfMjif42weNvgwPB4u6cDcTJcj0gS9OCdVTl4Fg0m2T5bJftxX06Trtrg== 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=v0I/rCDsHnbKqRKZZmLu9rpvFpNzbHGzH0q0wIfJyEI=; b=GtI/XMwELeZTexN35A/ybq6/Xc0T7O/2NVwjNowNviwcALvpVS2KpXPHLvMWo/XRbEJnKG4lB73ftwQhcju9bJylx3BDATCOzvH23NKkcx2rveWelHnVNuHZBAimDYWkCETzZmBTamboQkSLDqhLhD0mUSYYL0eEjeXWzUyiVt0= Received: from BYAPR11MB3143.namprd11.prod.outlook.com (2603:10b6:a03:92::32) by BYAPR11MB2823.namprd11.prod.outlook.com (2603:10b6:a02:c1::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3611.23; Thu, 26 Nov 2020 14:46:30 +0000 Received: from BYAPR11MB3143.namprd11.prod.outlook.com ([fe80::31df:76d6:bf35:3843]) by BYAPR11MB3143.namprd11.prod.outlook.com ([fe80::31df:76d6:bf35:3843%6]) with mapi id 15.20.3589.030; Thu, 26 Nov 2020 14:46:30 +0000 From: "Van Haaren, Harry" To: Olivier Matz , "dev@dpdk.org" CC: "Richardson, Bruce" , Jerin Jacob , "stable@dpdk.org" Thread-Topic: [PATCH] eal: fix errno on service cores init failure Thread-Index: AQHWxAA4m2MU9ICc30S9/cR/YbVin6nafEew Date: Thu, 26 Nov 2020 14:46:30 +0000 Message-ID: References: <20201126142523.25198-1-olivier.matz@6wind.com> In-Reply-To: <20201126142523.25198-1-olivier.matz@6wind.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: 6wind.com; dkim=none (message not signed) header.d=none;6wind.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [86.40.59.136] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 998011d1-1614-4575-b4ed-08d8921a0faa x-ms-traffictypediagnostic: BYAPR11MB2823: 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:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: oFt52WNjYU7BP6dZ3lnB7MN3GZL+eGfDr5uNZTCrikUBTeY9PUB4faiAi5XBrgvPJwivLWcmeIJNil/W9OOV34zexdOZT29JiCjrqZTPrMFM9j8iC1iP0HejtJKZZQVRWQkhjyAMO3Xsp3p+qniVINH4z7NL991E6LIJDaFQ6T5aK1Ix3goUOsBE98MIjGEn6sEz1Zq3kxYH24oKRE/Bkjwf4ZGpWRJsog8/T6OoJSI+H9CLV3bPpVDtxhwiDK5iu8oxqVhMhyA5bSZDydrCshu+I4DTVTHDDtGy1yub4tJD96wls9RDi/JFeuO7CQCO x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3143.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(366004)(376002)(39860400002)(396003)(136003)(316002)(8676002)(8936002)(71200400001)(110136005)(76116006)(478600001)(54906003)(186003)(26005)(2906002)(66476007)(5660300002)(9686003)(4326008)(53546011)(66556008)(64756008)(7696005)(55016002)(33656002)(6506007)(66946007)(52536014)(86362001)(83380400001)(66446008); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?J5fnMj7mCPQopRb+8cKwBtkl+f8BP4eqPOR8PSQ0/rnej4T7dPs3vzfnMJYq?= =?us-ascii?Q?pcLtWgb8Tw40TvTTicHrX2hjpCpdJhBkuyjzKTabpGDzFfcXEgiFtqe+O6+4?= =?us-ascii?Q?xv5t+/dptjXusiX/seHFYwN+y8EBWUJ/yNsoOKGZDmWTOW1NiGTr6dwhgKi3?= =?us-ascii?Q?1S1e69j38Ayx5pVHzJ/EOXkwFLvt3h4q5J9YaFTOLFI9JnAoLvJ6yS+oCGiy?= =?us-ascii?Q?ZkfWe/o8/hInf5dKBJJ442Mhc/15P8ko3JeFIlXPJAyh+iIzDPZGkDsxe5jN?= =?us-ascii?Q?St8v6Gbd78X/2mAXGHF8K5xoRmIS6oG6Xh9/sSjMA2rGwqyMbbJqUBt2L8qY?= =?us-ascii?Q?rRwC/+w+BRBep65apFyo/hkcnlx82jmodSiEYodb7/0yR8h6EL0YprBapyJw?= =?us-ascii?Q?KJX57cG+8qMQkboB5aYV89h38khnwK0YI2obLiXkpbY07cduOgzeMA3W6/AG?= =?us-ascii?Q?M81l08KbOoyIc2Lj19BTqZQ+R7TRUebyKTaMpDgDVcvTDlDogK8gKZCTKZl6?= =?us-ascii?Q?OQYoRMOxLlXO8UWdZEknvBpYAt2l8GIxdq02ZZJ+9TJg0RBAlYmPPMh2iP3W?= =?us-ascii?Q?4F255+5rPLoK/EKXESJfT58ZiQOjMzj+09AEBaM6lc5DI6G0y9t6d0hD4eyX?= =?us-ascii?Q?T9MX4Qp12tKtKYEfeXMgDfD63LsVI5Kfb3fu7xU5HKw/A4ypAt0qp5HxFAYQ?= =?us-ascii?Q?sRdix8yUBiLCk64MBXj1PfuYevEycG+PAbbF3EReo1J+ZPMrCmohfNgrsy/R?= =?us-ascii?Q?dGrf1qF3b708CQebn/Twgj0I3of9xurVxzAwNeAAlXmPARhUVM2fuYzIxzKU?= =?us-ascii?Q?pcjB1YSdLWSc3VPRzWyj25wJTjKLiATBWyfgahg3TLfeauGTswh1n6vEA40t?= =?us-ascii?Q?db9lBtGFYLG9FU61mR0XBZhPG3JtQKB9aKIkMXmJGBLLocinJ0I425bL50q8?= =?us-ascii?Q?pYj956PXd9bv3+ExpU6kuKFq+AL+w0Iqt8jOdzQBDoc=3D?= 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: BYAPR11MB3143.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 998011d1-1614-4575-b4ed-08d8921a0faa X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Nov 2020 14:46:30.1086 (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: DEwOx+BcaIcXh0ANstyMvU6ydLOD99adhZo3O005fyIMfXNB2DN4cA3G9kzltcFufNx9C8/sF/d+S7NK8wyk/EXO3vhXCvEMHnvzVyn12Pw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB2823 X-OriginatorOrg: intel.com Subject: Re: [dpdk-stable] [PATCH] eal: fix errno on service cores init failure X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" > -----Original Message----- > From: Olivier Matz > Sent: Thursday, November 26, 2020 2:25 PM > To: dev@dpdk.org > Cc: Richardson, Bruce ; Jerin Jacob > ; Van Haaren, Harry > ; stable@dpdk.org > Subject: [PATCH] eal: fix errno on service cores init failure >=20 > Currently, when rte_service_init() fails at initialization, we > see the following message: >=20 > Cannot init EAL: Exec format error >=20 > This error code does describe the real issue. Instead, use the error > code returned by the function. Should the above read as "does NOT describe" .. ? > Fixes: e39824500825 ("service: initialize with EAL") > Cc: stable@dpdk.org >=20 > Signed-off-by: Olivier Matz Few comments below, assuming agree on those, add my Ack on v2? Checked, -ENOMEM and -EALREADY are returned today, which seem better descriptive terms. Thanks for fixing, Acked-by: Harry van Haaren > --- > lib/librte_eal/freebsd/eal.c | 4 ++-- > lib/librte_eal/linux/eal.c | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) >=20 > diff --git a/lib/librte_eal/freebsd/eal.c b/lib/librte_eal/freebsd/eal.c > index d6ea023750..51478358c7 100644 > --- a/lib/librte_eal/freebsd/eal.c > +++ b/lib/librte_eal/freebsd/eal.c > @@ -906,7 +906,7 @@ rte_eal_init(int argc, char **argv) > ret =3D rte_service_init(); > if (ret) { > rte_eal_init_alert("rte_service_init() failed"); > - rte_errno =3D ENOEXEC; > + rte_errno =3D -ret; > return -1; > } Here we set rte_errno as -ret, as in rte_service_init() we return th= e negative, e.g. -ENOMEM. Perhaps it is cleaner to to return ENOMEM from rte_service_init(), and avoi= d the duplicate negation? rte_service_init() is not exported publicly in the .map file, so is interna= l only, and hence not an ABI break. > @@ -922,7 +922,7 @@ rte_eal_init(int argc, char **argv) > */ > ret =3D rte_service_start_with_defaults(); > if (ret < 0 && ret !=3D -ENOTSUP) { > - rte_errno =3D ENOEXEC; > + rte_errno =3D -ret; > return -1; > } >=20 > diff --git a/lib/librte_eal/linux/eal.c b/lib/librte_eal/linux/eal.c > index a4161be630..32b48c3de9 100644 > --- a/lib/librte_eal/linux/eal.c > +++ b/lib/librte_eal/linux/eal.c > @@ -1273,7 +1273,7 @@ rte_eal_init(int argc, char **argv) > ret =3D rte_service_init(); > if (ret) { > rte_eal_init_alert("rte_service_init() failed"); > - rte_errno =3D ENOEXEC; > + rte_errno =3D -ret; > return -1; > } >=20 > @@ -1295,7 +1295,7 @@ rte_eal_init(int argc, char **argv) > */ > ret =3D rte_service_start_with_defaults(); > if (ret < 0 && ret !=3D -ENOTSUP) { > - rte_errno =3D ENOEXEC; > + rte_errno =3D -ret; > return -1; > } >=20 > -- > 2.25.1