All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aaron Conole <aconole@redhat.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>,
	Thomas Monjalon <thomas.monjalon@6wind.com>,
	Stephen Hemminger <stephen@networkplumber.org>
Subject: [PATCH v7 14/14] rte_eal_init: add info about various error codes
Date: Wed, 22 Mar 2017 16:19:40 -0400	[thread overview]
Message-ID: <20170322201940.24028-15-aconole@redhat.com> (raw)
In-Reply-To: <20170322201940.24028-1-aconole@redhat.com>

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 <aconole@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 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

  parent reply	other threads:[~2017-03-22 20:19 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-22 20:19 [PATCH v7 00/14] eal: Remove most causes of panic on init Aaron Conole
2017-03-22 20:19 ` [PATCH v7 01/14] eal: do not panic on cpu detection Aaron Conole
2017-03-22 20:19 ` [PATCH v7 02/14] eal: do not panic when CPU isn't supported Aaron Conole
2017-03-23 13:47   ` Bruce Richardson
2017-03-23 14:27     ` Aaron Conole
2017-03-22 20:19 ` [PATCH v7 03/14] eal: do not panic on hugepage info init Aaron Conole
2017-03-22 20:19 ` [PATCH v7 04/14] eal: do not panic if parsing args returns error Aaron Conole
2017-03-22 20:19 ` [PATCH v7 05/14] eal: do not panic on memzone initialization fails Aaron Conole
2017-03-22 20:19 ` [PATCH v7 06/14] eal: set errno when exiting for already called Aaron Conole
2017-03-22 20:19 ` [PATCH v7 07/14] eal: do not panic on a number of conditions Aaron Conole
2017-03-22 20:19 ` [PATCH v7 08/14] eal: do not panic on timer init failure Aaron Conole
2017-03-22 20:19 ` [PATCH v7 09/14] eal: do not panic on interrupt thread init Aaron Conole
2017-03-22 20:19 ` [PATCH v7 10/14] eal: do not error if plugins fail to init Aaron Conole
2017-03-22 20:19 ` [PATCH v7 11/14] eal: do not panic on PCI failures Aaron Conole
2017-03-22 20:19 ` [PATCH v7 12/14] eal: do not panic if vdev init fails Aaron Conole
2017-03-22 20:19 ` [PATCH v7 13/14] eal: do not panic when bus probe/scan fails Aaron Conole
2017-03-22 20:19 ` Aaron Conole [this message]
2017-03-23 14:04 ` [PATCH v7 00/14] eal: Remove most causes of panic on init Bruce Richardson
2017-03-27 14:06   ` Thomas Monjalon
2017-03-31 17:54     ` Aaron Conole

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170322201940.24028-15-aconole@redhat.com \
    --to=aconole@redhat.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=stephen@networkplumber.org \
    --cc=thomas.monjalon@6wind.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.