Gaetan Rivet <[email protected]> writes:

> Do not add noise to the DBG log for empty sweeps.
> Only log time taken when some connections were cleaned.
>
> Signed-off-by: Gaetan Rivet <[email protected]>
> Reviewed-by: Eli Britstein <[email protected]>
> ---
>  lib/conntrack.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/lib/conntrack.c b/lib/conntrack.c
> index 8a7538b7b..823fb060a 100644
> --- a/lib/conntrack.c
> +++ b/lib/conntrack.c
> @@ -1647,8 +1647,10 @@ ct_sweep(struct conntrack *ct, long long now, size_t 
> limit)
>      }
>  
>  out:
> -    VLOG_DBG("conntrack cleanup %"PRIuSIZE" entries in %lld msec", count,
> -             time_msec() - now);
> +    if (count > 0) {

I think:

+    if (count) {

Since it's unsigned, if it is set it will only be positive.

> +        VLOG_DBG("conntrack cleanup %"PRIuSIZE" entries in %lld msec", count,
> +                 time_msec() - now);
> +    }
>      return min_expiration;
>  }

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

Reply via email to