On 6/3/15, 2:24 PM, "Thomas Monjalon" <thomas.monjalon at 6wind.com> wrote:
>Hi Keith, > >2015-06-03 13:49, Keith Wiles: >> Signed-off-by: Keith Wiles <keith.wiles at intel.com> >> --- >> lib/librte_eal/bsdapp/eal/eal.c | 20 ++++++++++++++++++++ >> lib/librte_eal/common/include/rte_eal.h | 32 >>++++++++++++++++++++++++++++++++ >> 2 files changed, 52 insertions(+) > >These comments would be useful: >As a RFC patch, it is not complete yet. >This new API may be used for <reason>. I was going to add this to the real patch: The new API is to reduce some of the clutter in the applications. Most of the applications need to do the following: int ret = rte_eal_init(argc, argv); if ( ret < 0 ) rte_exit(EXIT_FAILURE, "rte_eal_init: failed!"); argc -= ret; argv += ret; ret = parse_args(argc, argv); if ( ret < 0 ) rte_exit(EXIT_FAILURE, "parse_args:failed!"); With this new API: int ret = rte_eal_init_parse(argc, argv, parse_args); if ( ret < 0 ) rte_exit(EXIT_FAILURE, "rte_eal_init_parse: Failed!"); >