[ovs-dev] [PATCH] bridge: No QoS configured is not an error

2016-08-02 Thread Maxime Coquelin
If no QoS is configured, type value is likely to be an empty
string.

This is not an error though, so use the regular command reply
function, not the error one.

For example, before this patch:
  # ovs-appctl -t ovs-vswitchd qos/show vhost-user1
  QoS not configured on vhost-user1
  ovs-appctl: ovs-vswitchd: server returned an error

After the patch:
  # ovs-appctl -t ovs-vswitchd qos/show vhost-user1
  QoS not configured on vhost-user1

Signed-off-by: Maxime Coquelin 
---
 vswitchd/bridge.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
index 07f7b55..ddf1fe5 100644
--- a/vswitchd/bridge.c
+++ b/vswitchd/bridge.c
@@ -3199,7 +3199,7 @@ qos_unixctl_show(struct unixctl_conn *conn, int argc 
OVS_UNUSED,
 unixctl_command_reply(conn, ds_cstr(&ds));
 } else {
 ds_put_format(&ds, "QoS not configured on %s\n", iface->name);
-unixctl_command_reply_error(conn, ds_cstr(&ds));
+unixctl_command_reply(conn, ds_cstr(&ds));
 }
 } else {
 ds_put_format(&ds, "%s: failed to retrieve QOS configuration (%s)\n",
-- 
2.7.4

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


Re: [ovs-dev] [PATCH] bridge: No QoS configured is not an error

2016-08-02 Thread Stokes, Ian
> If no QoS is configured, type value is likely to be an empty string.
> 
> This is not an error though, so use the regular command reply function,
> not the error one.
> 
> For example, before this patch:
>   # ovs-appctl -t ovs-vswitchd qos/show vhost-user1
>   QoS not configured on vhost-user1
>   ovs-appctl: ovs-vswitchd: server returned an error
> 
> After the patch:
>   # ovs-appctl -t ovs-vswitchd qos/show vhost-user1
>   QoS not configured on vhost-user1
> 
> Signed-off-by: Maxime Coquelin 
> ---
>  vswitchd/bridge.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index
> 07f7b55..ddf1fe5 100644
> --- a/vswitchd/bridge.c
> +++ b/vswitchd/bridge.c
> @@ -3199,7 +3199,7 @@ qos_unixctl_show(struct unixctl_conn *conn, int
> argc OVS_UNUSED,
>  unixctl_command_reply(conn, ds_cstr(&ds));
>  } else {
>  ds_put_format(&ds, "QoS not configured on %s\n", iface-
> >name);
> -unixctl_command_reply_error(conn, ds_cstr(&ds));
> +unixctl_command_reply(conn, ds_cstr(&ds));
>  }
>  } else {
>  ds_put_format(&ds, "%s: failed to retrieve QOS configuration
> (%s)\n",
> --
> 2.7.4
> 
Thanks for the patch Maxime, looks good to me.

Acked-by: Ian Stokes 
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] [PATCH] bridge: No QoS configured is not an error

2016-08-04 Thread Daniele Di Proietto
Applied to master, thanks

2016-08-02 8:27 GMT-07:00 Stokes, Ian :

> > If no QoS is configured, type value is likely to be an empty string.
> >
> > This is not an error though, so use the regular command reply function,
> > not the error one.
> >
> > For example, before this patch:
> >   # ovs-appctl -t ovs-vswitchd qos/show vhost-user1
> >   QoS not configured on vhost-user1
> >   ovs-appctl: ovs-vswitchd: server returned an error
> >
> > After the patch:
> >   # ovs-appctl -t ovs-vswitchd qos/show vhost-user1
> >   QoS not configured on vhost-user1
> >
> > Signed-off-by: Maxime Coquelin 
> > ---
> >  vswitchd/bridge.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index
> > 07f7b55..ddf1fe5 100644
> > --- a/vswitchd/bridge.c
> > +++ b/vswitchd/bridge.c
> > @@ -3199,7 +3199,7 @@ qos_unixctl_show(struct unixctl_conn *conn, int
> > argc OVS_UNUSED,
> >  unixctl_command_reply(conn, ds_cstr(&ds));
> >  } else {
> >  ds_put_format(&ds, "QoS not configured on %s\n", iface-
> > >name);
> > -unixctl_command_reply_error(conn, ds_cstr(&ds));
> > +unixctl_command_reply(conn, ds_cstr(&ds));
> >  }
> >  } else {
> >  ds_put_format(&ds, "%s: failed to retrieve QOS configuration
> > (%s)\n",
> > --
> > 2.7.4
> >
> Thanks for the patch Maxime, looks good to me.
>
> Acked-by: Ian Stokes 
> ___
> dev mailing list
> dev@openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
>
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev