* [dpdk-dev] rte_eal_init independent from main(int argc, char** argv)
@ 2014-02-18 12:54 Hamid Ramazani
2014-02-18 12:57 ` Hamid Ramazani
0 siblings, 1 reply; 3+ messages in thread
From: Hamid Ramazani @ 2014-02-18 12:54 UTC (permalink / raw)
To: dev
Hi,
I'm in need of running an open() function, that is part another program.
open() does many things, the very first of them is rte_eal_init(argv, argc)
I should not receive argc, and argv from main function of the program,
but rather I should produce it myself.
What I've done inside open() function is:
int argc = 5;
char* argv[] = {"./build/l2fwd","-c","ff","-n","4"};
ret = rte_eal_init(argc,argv);
But I receive: invalid EAL arguments.
I'm thinking about writing another rte_eal_init function for myself.
What do you think?
Thanks in advance.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] rte_eal_init independent from main(int argc, char** argv)
2014-02-18 12:54 [dpdk-dev] rte_eal_init independent from main(int argc, char** argv) Hamid Ramazani
@ 2014-02-18 12:57 ` Hamid Ramazani
2014-02-18 13:52 ` Periklis Akritidis
0 siblings, 1 reply; 3+ messages in thread
From: Hamid Ramazani @ 2014-02-18 12:57 UTC (permalink / raw)
To: dev
actually I've used:
char* argv[] = {"./build/l2fwd","-c","ff","-n","4", NULL};
(NULL at the end of the list).
Thanks.
On 2/18/14, Hamid Ramazani <mrramazani@gmail.com> wrote:
> Hi,
> I'm in need of running an open() function, that is part another program.
> open() does many things, the very first of them is rte_eal_init(argv, argc)
> I should not receive argc, and argv from main function of the program,
> but rather I should produce it myself.
>
> What I've done inside open() function is:
> int argc = 5;
> char* argv[] = {"./build/l2fwd","-c","ff","-n","4"};
> ret = rte_eal_init(argc,argv);
>
> But I receive: invalid EAL arguments.
>
> I'm thinking about writing another rte_eal_init function for myself.
> What do you think?
>
> Thanks in advance.
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] rte_eal_init independent from main(int argc, char** argv)
2014-02-18 12:57 ` Hamid Ramazani
@ 2014-02-18 13:52 ` Periklis Akritidis
0 siblings, 0 replies; 3+ messages in thread
From: Periklis Akritidis @ 2014-02-18 13:52 UTC (permalink / raw)
To: Hamid Ramazani; +Cc: dev
Hi Hamid,
I do something similar and works fine. My compiler warning flags are more pedantic, so I have to ensure those strings are not const literals, but that doesn’t matter.
I would appreciate an init that takes a struct with options too.
On 18 Feb, 2014, at 8:57 pm, Hamid Ramazani <mrramazani@gmail.com> wrote:
> actually I've used:
> char* argv[] = {"./build/l2fwd","-c","ff","-n","4", NULL};
>
> (NULL at the end of the list).
>
> Thanks.
>
> On 2/18/14, Hamid Ramazani <mrramazani@gmail.com> wrote:
>> Hi,
>> I'm in need of running an open() function, that is part another program.
>> open() does many things, the very first of them is rte_eal_init(argv, argc)
>> I should not receive argc, and argv from main function of the program,
>> but rather I should produce it myself.
>>
>> What I've done inside open() function is:
>> int argc = 5;
>> char* argv[] = {"./build/l2fwd","-c","ff","-n","4"};
>> ret = rte_eal_init(argc,argv);
>>
>> But I receive: invalid EAL arguments.
>>
>> I'm thinking about writing another rte_eal_init function for myself.
>> What do you think?
>>
>> Thanks in advance.
>>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-02-18 13:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-18 12:54 [dpdk-dev] rte_eal_init independent from main(int argc, char** argv) Hamid Ramazani
2014-02-18 12:57 ` Hamid Ramazani
2014-02-18 13:52 ` Periklis Akritidis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).