All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wang Sheng-Hui <shhuiw-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Thomas Monjalon
	<thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
Cc: dev-VfR2kkLFssw@public.gmane.org
Subject: Re: [PATCH] eal: parse args before any kinds of init
Date: Fri, 18 Apr 2014 08:30:58 +0800	[thread overview]
Message-ID: <CAKXJSOGONR4MFNRnG6uhQ7Kki6DdLVfmA1i2mYyTjNgBJ_vfxg@mail.gmail.com> (raw)
In-Reply-To: <1535185.7KmB8bpc9i@xps13>

Thanks, Thomas.



2014-04-18 5:58 GMT+08:00 Thomas Monjalon <thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>:

> Hi,
>
> 2014-04-15 11:03, Wang Sheng-Hui:
> > Parse args first, to resolve any invalid args and give out the usage
> string.
> > E.g './helloworld --invalid', the '--invalid' will be checked before any
> > init. After the options are checked, take any init actions.
> >
> > Signed-off-by: Wang Sheng-Hui <shhuiw-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> [...]
> > +       fctret = eal_parse_args(argc, argv);
> > +       if (fctret < 0)
> > +               exit(1);
> > +
> >         if (rte_eal_log_early_init() < 0)
> >                 rte_panic("Cannot init early logs\n");
> >
> >         if (rte_eal_cpu_init() < 0)
> >                 rte_panic("Cannot detect lcores\n");
> >
> > -       fctret = eal_parse_args(argc, argv);
> > -       if (fctret < 0)
> > -               exit(1);
> > -
>
> Thank you for trying to improve this part.
>
> I think you cannot move eal_parse_args before rte_eal_log_early_init
> because
> eal_parse_args uses RTE_LOG.
> I cannot see why rte_eal_cpu_init is call before argument parsing but we
> should double check it.
>
> --
> Thomas
>

  reply	other threads:[~2014-04-18  0:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-15  3:03 [PATCH] eal: parse args before any kinds of init Wang Sheng-Hui
     [not found] ` <534CA193.2000604-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-04-17 21:58   ` Thomas Monjalon
2014-04-18  0:30     ` Wang Sheng-Hui [this message]
2014-05-05 15:50   ` Thomas Monjalon
2014-05-07 13:06     ` Thomas Monjalon
  -- strict thread matches above, loose matches on Subject: below --
2014-04-15  3:00 Wang Sheng-Hui

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=CAKXJSOGONR4MFNRnG6uhQ7Kki6DdLVfmA1i2mYyTjNgBJ_vfxg@mail.gmail.com \
    --to=shhuiw-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=dev-VfR2kkLFssw@public.gmane.org \
    --cc=thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org \
    /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.