From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from insanity1.niometrics.com (insanity.niometrics.com [173.255.214.239]) by dpdk.org (Postfix) with ESMTP id 9A0676945 for ; Tue, 18 Feb 2014 14:51:13 +0100 (CET) Received: from [10.0.1.4] (cm142.sigma148.maxonline.com.sg [218.212.148.142]) (authenticated bits=0) by insanity1.niometrics.com (8.13.8/8.13.8) with ESMTP id s1IDqPDe018205 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Tue, 18 Feb 2014 21:52:29 +0800 Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) From: Periklis Akritidis In-Reply-To: Date: Tue, 18 Feb 2014 21:52:24 +0800 Content-Transfer-Encoding: quoted-printable Message-Id: <30407979-1169-4E48-BAA9-073C18360D44@niometrics.com> References: To: Hamid Ramazani X-Mailer: Apple Mail (2.1827) Cc: dev@dpdk.org Subject: Re: [dpdk-dev] rte_eal_init independent from main(int argc, char** argv) X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Feb 2014 13:51:14 -0000 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=92t matter. I would appreciate an init that takes a struct with options too. On 18 Feb, 2014, at 8:57 pm, Hamid Ramazani = wrote: > actually I've used: > char* argv[] =3D {"./build/l2fwd","-c","ff","-n","4", NULL}; >=20 > (NULL at the end of the list). >=20 > Thanks. >=20 > On 2/18/14, Hamid Ramazani 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. >>=20 >> What I've done inside open() function is: >> int argc =3D 5; >> char* argv[] =3D {"./build/l2fwd","-c","ff","-n","4"}; >> ret =3D rte_eal_init(argc,argv); >>=20 >> But I receive: invalid EAL arguments. >>=20 >> I'm thinking about writing another rte_eal_init function for myself. >> What do you think? >>=20 >> Thanks in advance. >>=20