From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi0-f41.google.com (mail-oi0-f41.google.com [209.85.218.41]) by dpdk.org (Postfix) with ESMTP id 0D7763787 for ; Thu, 3 Dec 2015 11:08:19 +0100 (CET) Received: by oiww189 with SMTP id w189so44753499oiw.3 for ; Thu, 03 Dec 2015 02:08:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=sNOtVI4Zj5p9sUKWpvs3iTWlUkJi+1MHGuchuk3Nd3g=; b=QyLfWZ1r7QDvtZIBXlM3plbnkuHdei6BTkqNUZa8YUH8jd68/X0erAb0lZWYe9jckb mZ/u9HuhCakdi3S6W9JkSSZ7FYzgfakrS862pKjBekg93e+gEcDsle0WkADO8VOF3qCI d5en4Q1iPCWo8gtfExo3Ygb2S6Dfaw6GnQTNTGynEZkasKd4KHhk8QZApz7zE7tXtHQU CJ+Tl/XrEEbiq7bWjIxun9rX13A4eYxResM7UcJ5sHWTrhfVKSpxWXe2yy7CXbiDskql ezhWxYK2oTZErJlKRAXoNWco34sKSy1dWZPFm5FFevM/zE6C+1E8WLNxJ9rXM78u7Fwp 0qiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=sNOtVI4Zj5p9sUKWpvs3iTWlUkJi+1MHGuchuk3Nd3g=; b=QhBPDiRdX/0gNAsOERya7mr0F03vYunSw23UBQibpGTamC4l9hHUQLNbhGntp6JN7V MC9kiMCL7EaVvzHjtRpafrtAUSZ/e3QDmUS9d/QrSPC0RpxD3LVxh75UMPeTOvcLFBwU advOb5FVRVSpR/nAHqLw53Qg+DuCoxuIbCRnzcpmwvaVZcUanVg/2K/bD9FecLg9Jh24 45mkDlCVDg0ZkQ5TZQbbhl5e0ULBTGgMEZruz/ZHMng7v8Yh5DCRAVWgulip5Wlpua9T li0tmJNf37VGsX/3HN+VplWynB5VCGth3/txobYJP7FTcE1s95/dLYkHd/ASWxnku2XC osyg== X-Gm-Message-State: ALoCoQkKIxUNmxdEpsnExaUXZzARHY2dL+zW6A+1KcxlMza6Rjq0c2rXVn0RD7OdMOHlRcp4ZgDv MIME-Version: 1.0 X-Received: by 10.202.176.66 with SMTP id z63mr6510959oie.61.1449137298383; Thu, 03 Dec 2015 02:08:18 -0800 (PST) Received: by 10.76.153.5 with HTTP; Thu, 3 Dec 2015 02:08:18 -0800 (PST) In-Reply-To: <1449106720-30430-1-git-send-email-stephen@networkplumber.org> References: <1449106720-30430-1-git-send-email-stephen@networkplumber.org> Date: Thu, 3 Dec 2015 11:08:18 +0100 Message-ID: From: David Marchand To: Stephen Hemminger Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH] eal: don't crash if one pci device fails X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 10:08:19 -0000 On Thu, Dec 3, 2015 at 2:38 AM, Stephen Hemminger < stephen@networkplumber.org> wrote: > If there is a failure to setup one pci device, there maybe other > devices that can be initialized. Don't call rte_exit which > is a forced crash, pass the error back to the > application to decide what it wants to do. > > Might be good idea to return a positive value for the > number of devices found, but that would break ABI. > I don't see how this return code will help the application do something after this. You don't know which device probe failed with just this. rte_eal_pci_probe() returning a != 0 value will trigger a rte_panic in rte_eal_init() anyway. So I suppose you want to use rte_eal_pci_probe out of rte_eal_init. In such a case, why don't you use rte_eal_pci_probe_one ? -- David Marchand