[ovs-dev] [PATCH 1/2] netdev: Properly clear 'details' when iterating in NETDEV_QOS_FOR_EACH.

Eelco Chaudron echaudro at redhat.com
Wed Oct 3 07:01:33 UTC 2018


On 3 Oct 2018, at 1:02, Ben Pfaff wrote:

> The function comment for netdev_queue_dump_next() said that it cleared its
> 'detail' argument, but it didn't actually do that, which meant that details
> could be incorrectly carried along from one queue to the next.
>
> Reported-by: Flavio Leitner <fbl at sysclose.org>
> Signed-off-by: Ben Pfaff <blp at ovn.org>

Looks good!

Acked-by: Eelco Chaudron <echaudro at redhat.com>

> ---
>  lib/netdev.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/lib/netdev.c b/lib/netdev.c
> index 690d284092d4..722ea89bfeba 100644
> --- a/lib/netdev.c
> +++ b/lib/netdev.c
> @@ -1801,8 +1801,9 @@ bool
>  netdev_queue_dump_next(struct netdev_queue_dump *dump,
>                         unsigned int *queue_id, struct smap *details)
>  {
> -    const struct netdev *netdev = dump->netdev;
> +    smap_clear(details);
>
> +    const struct netdev *netdev = dump->netdev;
>      if (dump->error) {
>          return false;
>      }
> -- 
> 2.16.1
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev


More information about the dev mailing list