On Thu, Jul 11, 2024 at 08:20:28PM +0000, Vipul Ashri via dev wrote:
> 
> While running a test with a continous VM creation/deletion using an
> orchestration script with-in cloud environment. In parallel we have
> some monitoring script calling ovs-appctl dpctl/show stats commands
> every minute.
> 
> During VHU port delete, one of netdev references were not reduced to
> 0 as show_dpif call has not given-up the reference back or doing bad
> cleanup. This pending deference preventing VHU deletion sequence, this
> is found to be one of corner case inside dpctl code which results in
> leaking up netdev which ultimately results in stale VHU entry. After
> fixing this problematic cleanup, issue is not seen.
> 
> Fixes: fceef2095222 ("dpctl: add ovs-appctl dpctl/* commands to talk to 
> dpif-netdev")
> Signed-off-by: Vipul Ashri <[email protected]>

Acked-by: Simon Horman <[email protected]>

> ---
>  lib/dpctl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/dpctl.c b/lib/dpctl.c
> index a70df5342..81e9ca0e9 100644
> --- a/lib/dpctl.c
> +++ b/lib/dpctl.c
> @@ -739,7 +739,6 @@ show_dpif(struct dpif *dpif, struct dpctl_params *dpctl_p)
>              }
>              error = netdev_get_stats(netdev, &s);

FWIIW, i think netdev_close() could go here.

>              if (!error) {
> -                netdev_close(netdev);
>                  print_stat(dpctl_p, "    RX packets:", s.rx_packets);
>                  print_stat(dpctl_p, " errors:", s.rx_errors);
>                  print_stat(dpctl_p, " dropped:", s.rx_dropped);
> @@ -770,6 +769,7 @@ show_dpif(struct dpif *dpif, struct dpctl_params *dpctl_p)
>                  dpctl_print(dpctl_p, ", could not retrieve stats (%s)",
>                              ovs_strerror(error));
>              }
> +            netdev_close(netdev);
>          }
>          dpif_port_destroy(&dpif_port);
>      }

...
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to