From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f169.google.com (mail-pf0-f169.google.com [209.85.192.169]) by dpdk.org (Postfix) with ESMTP id 6EFA12B83 for ; Fri, 27 Jan 2017 17:27:48 +0100 (CET) Received: by mail-pf0-f169.google.com with SMTP id y143so74370467pfb.0 for ; Fri, 27 Jan 2017 08:27:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pg/rwHtAT8gYRhhhBnpXqNW580uPtCWk1FhjiP9h86M=; b=qcsOQchuIU7pzbZVCgWc8ZxUrZAwWtI2SwZYfmcsoggwnNhWbG8n0czHLQnXXHvGBB Y/FhVBTsKsDdL26l+C7iTMDM3wb3hmb92cG85C0XyA6DkQx/955iiEaheBCBsnXZdGxH mwCf+H6ORCAMcrJZRphBy7Qp7SpzQhOntbF8KjC4qntMDo9DIhXlCTIXxIrbVSygQZxV 5loXFG3nXZbRm7agJqvvUEt2m5SdKga5j5Og3RBayew3b2ekzCWXdjDlIg5Yt1AXBgbJ 8x5kgncxw1JR0pV4W6PT0rc5jc3ip8B9AVdpG4T2jfwWIZ7x923NdD+zluXwJDpB6Jfv 30pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pg/rwHtAT8gYRhhhBnpXqNW580uPtCWk1FhjiP9h86M=; b=hlDfGdmmkB5M06le/I1kkKhCFMcuO4vjybBPsWVTDoaj6icLuzjY6pyYV9BdrO1EaI BHMikeptyFkc7o5c6Zlnff5xp3zKba4wE5RwuRrkbAxWWlQIWTbEKDJN6tRjtGqlbFry KPfTpe48C0qOQ0xi8QmgKlFPlfwDqzmA+Q2W58WPyfbISlGOugKvDGuPN+6NSViRxGx7 FEWCkFlrGIMhm41SGSJZSQDukWKFBKAnFZgh/mvokJptw/JuBCpTk0DtgQ5d/QH6z1Gq mGZXUiJz/YtGEoC7LjoI9JVkLIW3ZvyXijLKAzj3fM/a8OjUsS2rUTb+p2YTPten9AY1 hf9w== X-Gm-Message-State: AIkVDXKyPBKB1h8eFbWUxzzDepvo65vjmQ5DzW1av0DDqAeCgMmHOVudW5igA0Gt+3FGTg== X-Received: by 10.99.184.18 with SMTP id p18mr10704618pge.20.1485534467591; Fri, 27 Jan 2017 08:27:47 -0800 (PST) Received: from xeon-e3 (204-195-18-65.wavecable.com. [204.195.18.65]) by smtp.gmail.com with ESMTPSA id o18sm12551431pgn.36.2017.01.27.08.27.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 27 Jan 2017 08:27:47 -0800 (PST) Date: Fri, 27 Jan 2017 08:27:38 -0800 From: Stephen Hemminger To: Aaron Conole Cc: dev@dpdk.org Message-ID: <20170127082738.791401e4@xeon-e3> In-Reply-To: <1485529023-5486-8-git-send-email-aconole@redhat.com> References: <1485529023-5486-1-git-send-email-aconole@redhat.com> <1485529023-5486-8-git-send-email-aconole@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 07/25] eal: Signal error when CPU isn't supported 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: , X-List-Received-Date: Fri, 27 Jan 2017 16:27:48 -0000 On Fri, 27 Jan 2017 09:56:45 -0500 Aaron Conole wrote: > It's now possible to gracefully exit the application, or for > applications which support non-dpdk datapaths working in concert with > DPDK datapaths, there no longer is the possibility of exiting for > unsupported CPUs. > > Signed-off-by: Aaron Conole > --- > lib/librte_eal/linuxapp/eal/eal.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c > index 413be16..cd976f5 100644 > --- a/lib/librte_eal/linuxapp/eal/eal.c > +++ b/lib/librte_eal/linuxapp/eal/eal.c > @@ -752,7 +752,10 @@ rte_eal_init(int argc, char **argv) > char thread_name[RTE_MAX_THREAD_NAME_LEN]; > > /* checks if the machine is adequate */ > - rte_cpu_check_supported(); > + if (!rte_cpu_is_supported()) { > + rte_errno = ENOTSUP; > + return -1; > + } > I like not having DPDK applications panic. My concern is that naive user will not know to check rte_errno. Why not put a high severity error out as well. If logging is not up just use stderr.