From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f51.google.com (mail-pg0-f51.google.com [74.125.83.51]) by dpdk.org (Postfix) with ESMTP id 104261023 for ; Fri, 27 Jan 2017 17:33:55 +0100 (CET) Received: by mail-pg0-f51.google.com with SMTP id 204so82547815pge.0 for ; Fri, 27 Jan 2017 08:33:55 -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=p7DCINp1gjgZUm7uax6BqUe8SNuxEa1+Gt2QuJc31rE=; b=FhsxM8UuinfITAX75Aq8Z5a2yaIeLR2o80BR/HezPTRWbpbAtEt168fW3bxES5qGLC M7yXTiemhXVZz7BTV+feSDaZctwhOJOSJOLRi0LB7hqLJfuGONcJnN1QgAdOhM5mfYhL EVCG7EBvvyJtsy20oEv4UInmxESysnINZMT+RyFivaYrLtVbiPJ7xlsKSMB5KH/ZRcxm LOut18ngwSuF1f1RsUPb23uAdyvKBa7v5b620zTUQ3uOqT1F4lp9LHG0yEymdfKBUJBu cqyxWFo4oDs9Q+u7dPF+nYmN/S+mrCDMASLRt5W+erDkyTNgxQKKlpB9uy7YegQBW12V 2qvA== 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=p7DCINp1gjgZUm7uax6BqUe8SNuxEa1+Gt2QuJc31rE=; b=UblWlepuZ7o9cJnvPwkjXyklvW7nwsqs3A8/sq0nj/Pb9ldBYqxg6l0QETxmachea8 i0Bml0/GdEOrvGZsmajkRtGgrRdNqp/zfmMztDa7sa6EYoMZuVa0/WqgUNqpvAGC1CUS yQFv3P4bPx1KvUTCxPI0cerkfAhQjb9xhMZSPAVfusytzGihthykWEmppF4rkD30jrNK 9aUgXjhmLKfaIVD5CF62INJ6Y/x9uUwLFVfNT204MEGf/18Zr0QZo0YW9551IIgAYoHp UpPj51W0MAuY93hIuv4/CYCxT5748xUt2kalK1cVXGvPxuakPilqX7q9AUduGzMKBKBF sBTw== X-Gm-Message-State: AIkVDXKW6WvNC3UuPtIoTuKivlvEqiKnmCIZgWpIYLbrN58yN1++apajYW0aYy3u7TbvdQ== X-Received: by 10.84.232.141 with SMTP id i13mr13714928plk.119.1485534835307; Fri, 27 Jan 2017 08:33:55 -0800 (PST) Received: from xeon-e3 (204-195-18-65.wavecable.com. [204.195.18.65]) by smtp.gmail.com with ESMTPSA id f65sm12626251pfk.5.2017.01.27.08.33.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 27 Jan 2017 08:33:54 -0800 (PST) Date: Fri, 27 Jan 2017 08:33:46 -0800 From: Stephen Hemminger To: Aaron Conole Cc: dev@dpdk.org Message-ID: <20170127083346.2bf55801@xeon-e3> In-Reply-To: <1485529023-5486-26-git-send-email-aconole@redhat.com> References: <1485529023-5486-1-git-send-email-aconole@redhat.com> <1485529023-5486-26-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 25/25] rte_eal_init: add info about rte_errno codes 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:33:56 -0000 On Fri, 27 Jan 2017 09:57:03 -0500 Aaron Conole wrote: > diff --git a/lib/librte_eal/common/include/rte_eal.h b/lib/librte_eal/common/include/rte_eal.h > index 03fee50..46e427f 100644 > --- a/lib/librte_eal/common/include/rte_eal.h > +++ b/lib/librte_eal/common/include/rte_eal.h > @@ -159,7 +159,29 @@ int rte_eal_iopl_init(void); > * function call and should not be further interpreted by the > * application. The EAL does not take any ownership of the memory used > * for either the argv array, or its members. > - * - On failure, a negative error value. > + * - On failure, -1 and rte_errno is set to a value indicating the cause > + * for failure. > + * > + * The error codes returned via rte_errno: > + * EACCES indicates a permissions issue. > + * > + * EAGAIN indicates either a bus or system resource was not available, > + * try again. > + * > + * EALREADY indicates that the rte_eal_init function has already been > + * called, and cannot be called again. > + * > + * EINVAL indicates invalid parameters were passed as argv/argc. > + * > + * EIO indicates failure to setup the logging handlers. This is usually > + * caused by an out-of-memory condition. > + * > + * ENODEV indicates memory setup issues. > + * > + * ENOTSUP indicates that the EAL cannot initialize on this system. > + * > + * EUNATCH indicates that the PCI bus is either not present, or is not > + * readable by the eal. > */ > int rte_eal_init(int argc, char **argv); Why use rte_errno? Most DPDK calls just return negative value on error which corresponds to error number. Are you trying to keep ABI compatibility? Doesn't make sense because before all these errors were panic's no working application is going to care.