[ovs-dev] [PATCH] bridge: Fix ovs-appctl qos/show repeated queue information

Flavio Leitner fbl at sysclose.org
Tue Oct 2 22:35:27 UTC 2018


On Tue, Oct 02, 2018 at 08:51:05AM -0400, Eelco Chaudron wrote:
> The patch below would stop qos/show to repeat information from the previous queues.
> See below an example before and after the fix:
> 
> Before:
> 
>   $ ovs-appctl qos/show p5p2
>   QoS: p5p2 linux-htb
>   max-rate: 2428800
> 
>   Default:
>     burst: 12512
>     min-rate: 12000
>     max-rate: 2428800
>     tx_packets: 0
>     tx_bytes: 0
>     tx_errors: 0
> 
>   Queue 20:
>     burst: 12512
>     burst: 12512
>     min-rate: 12000
>     min-rate: 12000
>     max-rate: 607200
>     max-rate: 2428800
>     tx_packets: 28780
>     tx_bytes: 43572920
>     tx_errors: 17611
> 
>   Queue 10:
>     burst: 12512
>     burst: 12512
>     burst: 12512
>     max-rate: 2428800
>     max-rate: 607200
>     max-rate: 2428800
>     min-rate: 12000
>     min-rate: 12000
>     min-rate: 12000
>     tx_packets: 71751
>     tx_bytes: 108631014
>     tx_errors: 18503
> 
> After:
> 
>   $ ovs-appctl qos/show p5p2
>   QoS: p5p2 linux-htb
>   max-rate: 2428800
> 
>   Default:
>     burst: 12512
>     min-rate: 12000
>     max-rate: 2428800
>     tx_packets: 0
>     tx_bytes: 0
>     tx_errors: 0
> 
>   Queue 20:
>     burst: 12512
>     min-rate: 12000
>     max-rate: 607200
>     tx_packets: 28780
>     tx_bytes: 43572920
>     tx_errors: 17611
> 
>   Queue 10:
>     burst: 12512
>     min-rate: 12000
>     max-rate: 2428800
>     tx_packets: 71751
>     tx_bytes: 108631014
>     tx_errors: 18503
> 
> Signed-off-by: Eelco Chaudron <echaudro at redhat.com>
> ---
>  vswitchd/bridge.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
> index 706a07c..875bb60 100644
> --- a/vswitchd/bridge.c
> +++ b/vswitchd/bridge.c
> @@ -3235,6 +3235,7 @@ qos_unixctl_show(struct unixctl_conn *conn, int argc OVS_UNUSED,
>              smap_init(&details);
>              NETDEV_QUEUE_FOR_EACH (&queue_id, &details, &dump, iface->netdev) {
>                  qos_unixctl_show_queue(queue_id, &details, iface, &ds);
> +                smap_clear(&details);
>              }
>              smap_destroy(&details);

Shouldn't that be part of NETDEV_QUEUE_FOR_EACH()?
It looks like ovn/controller/binding.c: setup_qos() might have the
same bug.

fbl



More information about the dev mailing list