On Mon, Mar 25, 2013 at 10:56 AM, Gurucharan Shetty <shet...@nicira.com> wrote:
> With single datapath, 'ovs-dpctl dump-flows ' dumps datapath flows for
> all the userspace bridges in a system. It can get a little harder
> to figure out the datapath flows belonging to a particular userspace
> bridge.
>
> This patch adds the 'ovs-appctl dpif/show' and 'ovs-appctl dpif/dump-flows'
> output for each userspace bridge. This gives us a summary of configured
> datapaths and all datapath flow entries for each bridge separately.
>
> Signed-off-by: Gurucharan Shetty <gshe...@nicira.com>
> ---
>  utilities/bugtool/automake.mk                      |    1 +
>  utilities/bugtool/ovs-bugtool-ovs-appctl-dpif      |   26 
> ++++++++++++++++++++
>  .../bugtool/plugins/network-status/openvswitch.xml |    1 +
>  xenserver/README                                   |    5 ++++
>  4 files changed, 33 insertions(+)
>  create mode 100755 utilities/bugtool/ovs-bugtool-ovs-appctl-dpif
>
> diff --git a/utilities/bugtool/automake.mk b/utilities/bugtool/automake.mk
> index 022ed71..9d1ff66 100644
> --- a/utilities/bugtool/automake.mk
> +++ b/utilities/bugtool/automake.mk
> @@ -24,6 +24,7 @@ bugtool_scripts = \
>         utilities/bugtool/ovs-bugtool-daemons-ver \
>         utilities/bugtool/ovs-bugtool-ovs-ofctl-show \
>         utilities/bugtool/ovs-bugtool-ovs-ofctl-dump-flows \
> +       utilities/bugtool/ovs-bugtool-ovs-appctl-dpif \
>         utilities/bugtool/ovs-bugtool-bond-show
>  scripts_SCRIPTS += $(bugtool_scripts)
>
> diff --git a/utilities/bugtool/ovs-bugtool-ovs-appctl-dpif 
> b/utilities/bugtool/ovs-bugtool-ovs-appctl-dpif
> new file mode 100755
> index 0000000..3560ef0
> --- /dev/null
> +++ b/utilities/bugtool/ovs-bugtool-ovs-appctl-dpif
> @@ -0,0 +1,26 @@
> +#! /bin/sh
> +
> +# This library is free software; you can redistribute it and/or
> +# modify it under the terms of version 2.1 of the GNU Lesser General
> +# Public License as published by the Free Software Foundation.
> +#
> +# This library is distributed in the hope that it will be useful,
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> +# Lesser General Public License for more details.
> +#
> +# You should have received a copy of the GNU Lesser General Public
> +# License along with this library; if not, write to the Free Software
> +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
> +# USA
> +#
> +# Copyright (C) 2013 Nicira, Inc.
> +
> +for bridge in `ovs-vsctl -- --real list-br`
While normally I don't think that ovs-vsctl prints garbage in stdout
when ovs-vsctl returns an error code, it might be worth to check
process return code and only then assume that stdout contains what we
expected. And then log an error, if there was one.

If you don't think that this is an issue, then looks good to me. Thanks!
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to