Re: [ovs-dev] [PATCH] ovs-vswitchd: Better diagnose errors in DPDK command-line options.

2014-09-30 Thread Ben Pfaff
Thanks a lot.  Applied to master.

On Tue, Sep 30, 2014 at 06:14:21PM +, Daniele Di Proietto wrote:
> Yes, I tested with and without DPDK.  It didn't cause any problem for me
> 
> Thanks,
> 
> Daniele
> 
> On 9/30/14, 11:10 AM, "Ben Pfaff"  wrote:
> 
> >On Tue, Sep 30, 2014 at 05:11:10PM +, Daniele Di Proietto wrote:
> >> On 9/30/14, 9:57 AM, "Ben Pfaff"  wrote:
> >> 
> >> >With DPDK compiled in, when the --dpdk option was given other than as
> >>the
> >> >first command-line argument, ovs-vswitchd silently ignored it.  Without
> >> >DPDK compiled in, when the --dpdk option was given anywhere,
> >>ovs-vswitchd
> >> >silently ignored it.  However, in each case any options following
> >>--dpdk
> >> >were not ignored, and since --dpdk is normally followed by additional
> >> >DPDK-specific options, this caused even more confusing trouble.
> >> >
> >> >Signed-off-by: Ben Pfaff 
> >> 
> >> Acked-by: Daniele Di Proietto 
> >
> >I only tested this without DPDK.  I guess that you checked that it
> >didn't cause any problem when built with DPDK?
> >
> >(I should have mentioned this in the commit message above.)
> >
> >Thanks,
> >
> >Ben.
> 
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] [PATCH] ovs-vswitchd: Better diagnose errors in DPDK command-line options.

2014-09-30 Thread Daniele Di Proietto
Yes, I tested with and without DPDK.  It didn't cause any problem for me

Thanks,

Daniele

On 9/30/14, 11:10 AM, "Ben Pfaff"  wrote:

>On Tue, Sep 30, 2014 at 05:11:10PM +, Daniele Di Proietto wrote:
>> On 9/30/14, 9:57 AM, "Ben Pfaff"  wrote:
>> 
>> >With DPDK compiled in, when the --dpdk option was given other than as
>>the
>> >first command-line argument, ovs-vswitchd silently ignored it.  Without
>> >DPDK compiled in, when the --dpdk option was given anywhere,
>>ovs-vswitchd
>> >silently ignored it.  However, in each case any options following
>>--dpdk
>> >were not ignored, and since --dpdk is normally followed by additional
>> >DPDK-specific options, this caused even more confusing trouble.
>> >
>> >Signed-off-by: Ben Pfaff 
>> 
>> Acked-by: Daniele Di Proietto 
>
>I only tested this without DPDK.  I guess that you checked that it
>didn't cause any problem when built with DPDK?
>
>(I should have mentioned this in the commit message above.)
>
>Thanks,
>
>Ben.

___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] [PATCH] ovs-vswitchd: Better diagnose errors in DPDK command-line options.

2014-09-30 Thread Ben Pfaff
On Tue, Sep 30, 2014 at 05:11:10PM +, Daniele Di Proietto wrote:
> On 9/30/14, 9:57 AM, "Ben Pfaff"  wrote:
> 
> >With DPDK compiled in, when the --dpdk option was given other than as the
> >first command-line argument, ovs-vswitchd silently ignored it.  Without
> >DPDK compiled in, when the --dpdk option was given anywhere, ovs-vswitchd
> >silently ignored it.  However, in each case any options following --dpdk
> >were not ignored, and since --dpdk is normally followed by additional
> >DPDK-specific options, this caused even more confusing trouble.
> >
> >Signed-off-by: Ben Pfaff 
> 
> Acked-by: Daniele Di Proietto 

I only tested this without DPDK.  I guess that you checked that it
didn't cause any problem when built with DPDK?

(I should have mentioned this in the commit message above.)

Thanks,

Ben.
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] [PATCH] ovs-vswitchd: Better diagnose errors in DPDK command-line options.

2014-09-30 Thread Daniele Di Proietto
On 9/30/14, 9:57 AM, "Ben Pfaff"  wrote:

>With DPDK compiled in, when the --dpdk option was given other than as the
>first command-line argument, ovs-vswitchd silently ignored it.  Without
>DPDK compiled in, when the --dpdk option was given anywhere, ovs-vswitchd
>silently ignored it.  However, in each case any options following --dpdk
>were not ignored, and since --dpdk is normally followed by additional
>DPDK-specific options, this caused even more confusing trouble.
>
>Signed-off-by: Ben Pfaff 

Acked-by: Daniele Di Proietto 

___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


[ovs-dev] [PATCH] ovs-vswitchd: Better diagnose errors in DPDK command-line options.

2014-09-30 Thread Ben Pfaff
With DPDK compiled in, when the --dpdk option was given other than as the
first command-line argument, ovs-vswitchd silently ignored it.  Without
DPDK compiled in, when the --dpdk option was given anywhere, ovs-vswitchd
silently ignored it.  However, in each case any options following --dpdk
were not ignored, and since --dpdk is normally followed by additional
DPDK-specific options, this caused even more confusing trouble.

Signed-off-by: Ben Pfaff 
---
 lib/netdev-dpdk.h   | 7 ++-
 vswitchd/ovs-vswitchd.c | 1 +
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/lib/netdev-dpdk.h b/lib/netdev-dpdk.h
index e4ba6fc..c24d6da 100644
--- a/lib/netdev-dpdk.h
+++ b/lib/netdev-dpdk.h
@@ -28,9 +28,14 @@ void thread_set_nonpmd(void);
 
 #else
 
+#include "util.h"
+
 static inline int
-dpdk_init(int arg1 OVS_UNUSED, char **arg2 OVS_UNUSED)
+dpdk_init(int argc, char **argv)
 {
+if (argc >= 2 && !strcmp(argv[1], "--dpdk")) {
+ovs_fatal(0, "DPDK support not built into this copy of Open vSwitch.");
+}
 return 0;
 }
 
diff --git a/vswitchd/ovs-vswitchd.c b/vswitchd/ovs-vswitchd.c
index b0d08e8..3c82f0f 100644
--- a/vswitchd/ovs-vswitchd.c
+++ b/vswitchd/ovs-vswitchd.c
@@ -215,6 +215,7 @@ parse_options(int argc, char *argv[], char **unixctl_pathp)
 exit(EXIT_FAILURE);
 
 case OPT_DPDK:
+ovs_fatal(0, "--dpdk must be given at beginning of command line.");
 break;
 
 default:
-- 
2.1.0

___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev