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 27C39A04DD; Thu, 26 Nov 2020 17:43:13 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D0762C9FE; Thu, 26 Nov 2020 17:43:10 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id B2D30C9F4; Thu, 26 Nov 2020 17:43:07 +0100 (CET) IronPort-SDR: 1z4j3lnhoXHva/8V1kV6bbZolgfa5JEYo+xVOR6Dav4XXxPZNA6EDNHgd2/XgTVS6It8iKMvJQ d4y2qM9l6paA== X-IronPort-AV: E=McAfee;i="6000,8403,9817"; a="151561586" X-IronPort-AV: E=Sophos;i="5.78,372,1599548400"; d="scan'208";a="151561586" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Nov 2020 08:43:03 -0800 IronPort-SDR: qFUcaIbvQsY7gX+EsRnilXSTvy4tApcKqx+IocgV87P5WK+6uPFWiqKU246lZyn6a6qq9uXBRA Sx52QUUkaiMQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,372,1599548400"; d="scan'208";a="433308162" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by fmsmga001.fm.intel.com with ESMTP; 26 Nov 2020 08:43:03 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx604.amr.corp.intel.com (10.18.126.84) 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 08:43:03 -0800 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) 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; Thu, 26 Nov 2020 08:43:02 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx612.amr.corp.intel.com (10.18.126.92) 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 08:43:02 -0800 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.168) by edgegateway.intel.com (192.55.55.71) 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 08:43:02 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ve2nL2zWaIqd6rP8HsvqDGqvs6YhbgNquBXSGTYXQ4UoZjitxG4ta4voNFpGDZexZQgaoHGASjpwebKe6aJsc7o3UJive5/qOe/Nllixwj/63GDjS3rTXinkjSpHMJt+2KdrIRqDCaz0v7p9LcVxRfsAlFrx/wtt/sRRuoNxoJjo0/WVYdNm8cSVLHhhC+IObUammpwrMQK6oDnE4UaI8LhWvPP+Y4hXcHp8w21kUn9SfWsX8zd2AKcJoGaocMWdM/Zaq8K1/hMwFmvozehkwJLmLCWB6e5Mys2nlESBwPBl7uF9eADihyUuxsl892D0xfwOrN4vsjyHR71jqzx+Ag== 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=Z8Oj5MStVmZegftA2WaTidB3GMyY8iffBN7olNud+T0=; b=ZaBQHAS1was0xGfMRDFIPQYke2Wmc3V+Nv2PCJZa7q28tp54XW+CGn7+jbaHiOgnrDYobUwFXjEODQk8fAbWVIhcrgyQ7ZuLRxw7UjmmIeDJ8dcFoIID3DmMlUk+3grLYVMpDi5en1H9fdqYpwx4vkoDDHtujn1cmLQP1qgXXKNmOqA3DFjexATOnPN+hKrsO9sGZMWDrM/jobpKRl5eOi4P0HfPDY2HN9K+XE0qeCq+KIea0ue3mSzBie/3dNE1y0Mo1ueGGxd2t5bGLqGgQ55o5A+lf39EYbi/BkHvVXtHrsMFIOiAXVMyXYN3wotVZVsGhanHA3hLdIl7WpMpcA== 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=Z8Oj5MStVmZegftA2WaTidB3GMyY8iffBN7olNud+T0=; b=ivu+SHi2BMRt6nJa9bPz97i1J640glqW4LDhQL/tStN8bspIsV0zjyhT2U4Z8YXi9J55BKbv9dT9fEs5QMe22hQjCO+FBqK9jYr85Mx/LsRfWprmHbOqIFucv6j0g/LPbgsaakaaph4/gtXg4/tAWh33I5pc+qYyZD1S/ROgFZQ= Received: from BYAPR11MB3143.namprd11.prod.outlook.com (2603:10b6:a03:92::32) by BYAPR11MB2933.namprd11.prod.outlook.com (2603:10b6:a03:90::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3589.30; Thu, 26 Nov 2020 16:42:54 +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 16:42:36 +0000 From: "Van Haaren, Harry" To: Olivier Matz CC: "dev@dpdk.org" , "Richardson, Bruce" , Jerin Jacob , "stable@dpdk.org" Thread-Topic: [PATCH] eal: fix errno on service cores init failure Thread-Index: AQHWxAA4m2MU9ICc30S9/cR/YbVin6nafEewgAAgeoCAAAEu0A== Date: Thu, 26 Nov 2020 16:42:36 +0000 Message-ID: References: <20201126142523.25198-1-olivier.matz@6wind.com> <20201126163707.GA1898@platinum> In-Reply-To: <20201126163707.GA1898@platinum> 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: e1bdb0cc-369a-4221-a467-08d8922a4809 x-ms-traffictypediagnostic: BYAPR11MB2933: 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: wec/DohmeaNTyjbZrdJD/kPxkS6T5+yCJmzP37OEAbV8AXvqCkg31j7VBO86oxzKe6CIdLVogcsP0UuOu/Q3PbDD9cBIPxiufKKvBWDyIDZNb0DtpaaGlj0ChrYTJIVOF84ZsfRm6uGUOFWIjIClWYhh8DnCCtCn4zXX7zKmXNqxef3CExa9WI4/r4lV1wYOeZIYWYbkA61wyuCgq8flN359NGCEdESUIUpHkC4WEUFjWQLbEYvdIcJehNpSt37n4bkgww4RLHIuR3VPjVgxFRDdc/oXMJqGd60sCh6bVsr/WqkiN2RDKBX0CQ+LWC+U 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)(366004)(376002)(346002)(39860400002)(136003)(396003)(8936002)(66476007)(66946007)(55016002)(8676002)(64756008)(86362001)(66446008)(478600001)(6916009)(83380400001)(4326008)(52536014)(54906003)(76116006)(9686003)(66556008)(71200400001)(316002)(7696005)(26005)(5660300002)(186003)(33656002)(2906002)(53546011)(6506007); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?DN1F45r/v6M3/j3Wz/XVj2xS9sd7w+EK7AIdDe5zFJNayB0cTCcsAEQzTR62?= =?us-ascii?Q?3ctaAQFtsGbev05VL4Rmvt/w5p4pLlZxf4z3ZGvGl0cx/V65KukVjJhel9O4?= =?us-ascii?Q?gCwXlR3ALoJXI9EJM7ukZEjkVcOWjV5LPobBzgm8hhKcnlgYR3pBv454dlSs?= =?us-ascii?Q?8vwGWyIpldtxOmpAynbuQQC/5XMvZTJGLYvhSqsQXeqd4qdtXHiwDVBuJ2qy?= =?us-ascii?Q?sUR9Vog88yJWleiXZ0ne9nNahcUOS3srGwPzS7L4nu7gkCA8c3YxAFDSYHD5?= =?us-ascii?Q?aDT6hMtlW8RkFqXGBqGS6iD/MpY/fOj740vjtMRiSsLc30l5grA5KaITXmHD?= =?us-ascii?Q?01cSpJ9BGWpqM/zSTR5A3w2SWyi9+Xo5kzOAeKdURr00vf0IPUCV2wR+LFIS?= =?us-ascii?Q?bK5Rh7yZePL9q+IH/GquPeOXjxnZYtoyQMiT8ZakVi92PL+XbAReKI9XLPFI?= =?us-ascii?Q?dbbezxpLlnNVG2Af9CEeUoknbSVLXN3n6ZKpVc7qNPyeeJDCPPjEkJr2U65Q?= =?us-ascii?Q?YDYW9po1EvtGkD63ExHzDqmDoyw3XtXYkNbaTAI0QqYADPyblRZFQOdPq9wI?= =?us-ascii?Q?vswClN3qU715jXU9ROaYqL9k5SlLqHnpKlPMHjZ1RsOTi//PHx5IBQzEXnpH?= =?us-ascii?Q?C0MjzhIK2uDgsaOlwtxtsIt+qyl/GX8wLLojhKRiviRpUAwshvmo6ewoMzFv?= =?us-ascii?Q?qo9v6PVOjhVNzhQX6yvrrlnXR9qrKA6KVMt/pF7eI5ournk1NC/xCQtI0iuM?= =?us-ascii?Q?7KFAdfyJjy/BVHNogNipgTMza0FVmCyUh6KMqrOfjM6zEQeqoN/BqUnK46Lg?= =?us-ascii?Q?mEeuWlDYy38YVwtgobHzDn1Wg1yS4BHbOTzCc0+CG+Z3Ht6D6JIlhEt2FiAq?= =?us-ascii?Q?kkNQn7zBdxWQC3S53jgMBTQwLdR3qlzbu33Mpujd87n7zzTvFFt3TdJ2T2ew?= =?us-ascii?Q?eb6TmLZhf1uuUqrKWfrRRPXowsfxNm6gzw3G0QKkgwk=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: e1bdb0cc-369a-4221-a467-08d8922a4809 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Nov 2020 16:42:36.6429 (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: lTqrwSdo7A2NiPzmcvNZL27e1FnQS/vpIvYgPNf0lnlIQf+2G/JS8n/cy7FrUUWEU4sadzKdbkUux+izN8HadiY8ZUeeEZHHal9e11oRV08= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB2933 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH] eal: fix errno on service cores init failure 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" > -----Original Message----- > From: Olivier Matz > Sent: Thursday, November 26, 2020 4:37 PM > To: Van Haaren, Harry > Cc: dev@dpdk.org; Richardson, Bruce ; Jerin J= acob > ; stable@dpdk.org > Subject: Re: [PATCH] eal: fix errno on service cores init failure >=20 > Hi Harry, >=20 > On Thu, Nov 26, 2020 at 02:46:30PM +0000, Van Haaren, Harry wrote: > > > -----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 > > > > > > Currently, when rte_service_init() fails at initialization, we > > > see the following message: > > > > > > Cannot init EAL: Exec format error > > > > > > 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 > > > > > > 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(-) > > > > > > diff --git a/lib/librte_eal/freebsd/eal.c b/lib/librte_eal/freebsd/ea= l.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 retur= n the negative, > e.g. -ENOMEM. > > Perhaps it is cleaner to to return ENOMEM from rte_service_init(), and = avoid the > duplicate negation? > > > > rte_service_init() is not exported publicly in the .map file, so is int= ernal only, and > hence not an ABI break. >=20 > I think returning -errno is common in dpdk, so I'll keep it like > this. Or it can eventually return -1 and set rte_errno. OK, fine with as is too, minor thing, thanks!