[dpdk-dev] rte_eal_init() alternative?

Stephen Hemminger stephen at networkplumber.org
Wed Sep 2 21:00:39 CEST 2015


On Wed, 2 Sep 2015 18:17:40 +0000
Don Provan <dprovan at bivio.net> wrote:

> Thomas Monjalon:
> >Yes but please, do not create an alternative init function.
> >We just need to replace panic/exit with error codes and be sure that apps and examples handle them correctly.
> 
> I understand your concerns, but the panics are really just the tip of the iceberg of the EAL library not realizing it's a library. It really makes no sense to think the library should define the application's command line, or that the PCI bus should be probed without considering whether this application is going to use PCI, and or to insist that EAL work be done on internal EAL threads.
> 
> So I'd say it's way past time to consider revamping initialization to start the process of ending the DPDK library's tail wagging the application's dog. Naturally this would have to be done while retaining the existing init routine on top of a real library initialization, but that's just an unfortunate artifact of the library's history, not a rational design decision for moving forward.
> 
> -don provan
> 

You are welcome to submit patches with what you are proposing for review.
Theoretical requirements discussions will probably only result in more mail,
not new code. You know what you want, propose a solution.

As far as the command line. That is easily managed by realizing the application
doesn't have to pass the original command line into EAL. If you just view the
command line as a way to pass unstructured options; the application or infrastructure
can build up new values and pass it in.

I agree that initialization itself should try and not fail except in the
most extreme cases.  "ie I can't find /sys what is wrong" and should try
and adapt more "you asked for 128 cpu's but I see only 2, log it and continue"



More information about the dev mailing list