From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aaron Conole Subject: [PATCH v7 14/14] rte_eal_init: add info about various error codes Date: Wed, 22 Mar 2017 16:19:40 -0400 Message-ID: <20170322201940.24028-15-aconole@redhat.com> References: <20170322201940.24028-1-aconole@redhat.com> Cc: Bruce Richardson , Thomas Monjalon , Stephen Hemminger To: dev@dpdk.org Return-path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 3BD731075 for ; Wed, 22 Mar 2017 21:19:51 +0100 (CET) In-Reply-To: <20170322201940.24028-1-aconole@redhat.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The rte_eal_init function will now pass failure reason hints to the application. To help app developers deciper this, add some brief information about what the codes are indicating. Signed-off-by: Aaron Conole Acked-by: Bruce Richardson --- lib/librte_eal/common/include/rte_eal.h | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/lib/librte_eal/common/include/rte_eal.h b/lib/librte_eal/common/include/rte_eal.h index 03fee50..abf020b 100644 --- a/lib/librte_eal/common/include/rte_eal.h +++ b/lib/librte_eal/common/include/rte_eal.h @@ -159,7 +159,32 @@ 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. In some instances, the application will need to be + * restarted as part of clearing the issue. + * + * Error codes returned via rte_errno: + * EACCES indicates a permissions issue. + * + * EAGAIN indicates either a bus or system resource was not available, + * setup may be attempted again. + * + * EALREADY indicates that the rte_eal_init function has already been + * called, and cannot be called again. + * + * EFAULT indicates the tailq configuration name was not found in + * memory configuration. + * + * EINVAL indicates invalid parameters were passed as argv/argc. + * + * ENOMEM indicates failure likely caused by an out-of-memory condition. + * + * ENODEV indicates memory setup issues. + * + * ENOTSUP indicates that the EAL cannot initialize on this system. + * + * EPROTO indicates that the PCI bus is either not present, or is not + * readable by the eal. */ int rte_eal_init(int argc, char **argv); -- 2.9.3