Skip to content

RFC Refactor eal_init to remove panic() calls

Aaron Conole dpdk-dev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest23 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/23eal: CPU init will no longer paniclib/librte_eal/common/eal_common_lcore.c+4 -30 replies
2/23eal: return error instead of panic for cpu initlib/librte_eal/linuxapp/eal/eal.c+5 -20 replies
3/23eal: No panic on hugepages info initlib/librte_eal/linuxapp/eal/eal_hugepage_info.c+4 -20 replies
4/23eal: do not panic on failed hugepage querylib/librte_eal/linuxapp/eal/eal.c+5 -20 replies
5/23eal: failure to parse args returns errorlib/librte_eal/linuxapp/eal/eal.c+5 -20 replies
6/23eal-common: introduce a way to query cpu supportlib/librte_eal/common/eal_common_cpuflags.c lib/librte_eal/common/include/generic/rte_cpuflags.h+20 -20 replies
7/23eal: Signal error when CPU isn't supportedlib/librte_eal/linuxapp/eal/eal.c+4 -10 replies
8/23eal: do not panic on memzone initialization failslib/librte_eal/linuxapp/eal/eal.c+5 -20 replies
9/23eal: set errno when exiting for already calledlib/librte_eal/linuxapp/eal/eal.c+3 -10 replies
10/23eal: Do not panic on log failureslib/librte_eal/linuxapp/eal/eal.c+5 -20 replies
11/23eal: Do not panic on pci-probelib/librte_eal/linuxapp/eal/eal.c+5 -20 replies
12/23eal: do not panic on vfio failurelib/librte_eal/linuxapp/eal/eal.c+5 -20 replies
13/23eal: do not panic on memory initlib/librte_eal/linuxapp/eal/eal.c+5 -20 replies
14/23eal: do not panic on tailq initlib/librte_eal/common/eal_common_tailqs.c lib/librte_eal/linuxapp/eal/eal.c+7 -40 replies
15/23eal: do not panic on alarm initlib/librte_eal/linuxapp/eal/eal.c+7 -20 replies
16/23eal: convert timer_init not to call paniclib/librte_eal/linuxapp/eal/eal.c+5 -20 replies
17/23eal: change the private pipe call to reflect errnolib/librte_eal/linuxapp/eal/eal_interrupts.c+4 -10 replies
18/23eal: Do not panic on interrupt thread initlib/librte_eal/linuxapp/eal/eal.c+5 -20 replies
19/23eal: do not error if plugins fail to initlib/librte_eal/linuxapp/eal/eal.c+3 -20 replies
20/23eal_pci: Continue probing even on failureslib/librte_eal/common/eal_common_pci.c+10 -50 replies
21/23eal: do not panic on failed PCI probelib/librte_eal/linuxapp/eal/eal.c+5 -20 replies
22/23eal_common_dev: continue initializing vdevslib/librte_eal/common/eal_common_dev.c+3 -20 replies
23/23eal: do not panic (or abort) if vdev init failslib/librte_eal/linuxapp/eal/eal.c+1 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC 00/23] Refactor eal_init to remove panic() calls

In many cases, it's enough to simply let the application know that the call to initialize DPDK has failed. A complete halt can then be decided by the application based on error returned (and the app could even attempt a possible re-attempt after some corrective action by the user or application).

There is still some work left in this series.

One bit of work left is to take the calls which could reasonably be corrected (and then init can be re-attempted), and make sure to clear the already-initialized flag.

Another piece of work is to fix the lcore master/slave errors to properly reflect thread state.

Finally, some real heavy testing should be done. The series wasn't tested much, and could use real soak time. Especially around some of the calls where it no longer returns an error (for instance, vdev init and plugin init).

Aaron Conole (23):
eal: CPU init will no longer panic
eal: return error instead of panic for cpu init
eal: No panic on hugepages info init
eal: do not panic on failed hugepage query
eal: failure to parse args returns error
eal-common: introduce a way to query cpu support
eal: Signal error when CPU isn't supported
eal: do not panic on memzone initialization fails
eal: set errno when exiting for already called
eal: Do not panic on log failures
eal: Do not panic on pci-probe
eal: do not panic on vfio failure
eal: do not panic on memory init
eal: do not panic on tailq init
eal: do not panic on alarm init
eal: convert timer_init not to call panic
eal: change the private pipe call to reflect errno
eal: Do not panic on interrupt thread init
eal: do not error if plugins fail to init
eal_pci: Continue probing even on failures
eal: do not panic on failed PCI probe
eal_common_dev: continue initializing vdevs
eal: do not panic (or abort) if vdev init fails

 lib/librte_eal/common/eal_common_cpuflags.c        |  13 ++-
 lib/librte_eal/common/eal_common_dev.c             |   5 +-
 lib/librte_eal/common/eal_common_lcore.c           |   7 +-
 lib/librte_eal/common/eal_common_pci.c             |  15 ++-
 lib/librte_eal/common/eal_common_tailqs.c          |   4 +-
 .../common/include/generic/rte_cpuflags.h          |   9 ++
 lib/librte_eal/linuxapp/eal/eal.c                  | 109 +++++++++++++++------
 lib/librte_eal/linuxapp/eal/eal_hugepage_info.c    |   6 +-
 lib/librte_eal/linuxapp/eal/eal_interrupts.c       |   5 +-
 9 files changed, 125 insertions(+), 48 deletions(-)
Signature · 1 line
2.7.4