Well we're really not 'skipping' the '--dpdk' argument since that is passed to rte_eal_init() as well. We're skipping the program name which is the path to ovs-vswitchd. I'd change the comment in the patch to something like:
diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index fbdb6b3..5cd4a07 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c @@ -1193,7 +1193,8 @@ dpdk_init(int argc, char **argv) rte_memzone_dump(); rte_eal_init_ret = 0; - return result; + /* We need to skip 'result' arguments plus the program name itself */ + return result + 1; } void Otherwise, LGTM. Acked-by: Ryan Wilson <wr...@nicira.com> Can someone else review this and if they have no qualms, push it? This is necessary for DPDK to work properly. On 6/16/14 9:46 AM, "Daniele Di Proietto" <ddiproie...@vmware.com> wrote: >rte_eal_init() returns the number of parsed dpdk arguments to skip. >dpdk_init() should add 1 to that number, because it has already skipped >the >"--dpdk" argument itself > >Signed-off-by: Daniele Di Proietto <ddiproie...@vmware.com> >--- > lib/netdev-dpdk.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c >index fbdb6b3..1ae5217 100644 >--- a/lib/netdev-dpdk.c >+++ b/lib/netdev-dpdk.c >@@ -1193,7 +1193,8 @@ dpdk_init(int argc, char **argv) > rte_memzone_dump(); > rte_eal_init_ret = 0; > >- return result; >+ /* We need to skip 'result' arguments plus the "--dpdk" argument >itself */ >+ return result + 1; > } > > void >-- >2.0.0 > >_______________________________________________ >dev mailing list >dev@openvswitch.org >https://urldefense.proofpoint.com/v1/url?u=http://openvswitch.org/mailman/ >listinfo/dev&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=TfBS78Vw3dzttvXidhbffg% >3D%3D%0A&m=YHHbETWmp5Oa3XgP%2BcIg9XyAXHfV73IFEmQJ8uMHZcs%3D%0A&s=4306bd16f >cbb62b8d4255b12d84dfc16ba8fde09d0d0bba9bf0e110877852ea2 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev