Re: [ovs-dev] [PATCH ovn 10/12] Export `VLOG_WARN` and `VLOG_ERR` from libovn for use in ddlog

2020-11-04 Thread 0-day Robot
Bleep bloop.  Greetings Ben Pfaff, I am a robot and I have tried out your patch.
Thanks for your contribution.

I encountered some error that I wasn't expecting.  See the details below.


checkpatch:
WARNING: Unexpected sign-offs from developers who are not authors or co-authors 
or committers: Ben Pfaff 
Lines checked: 61, Warnings: 1, Errors: 0


Please check this out.  If you feel there has been an error, please email 
acon...@redhat.com

Thanks,
0-day Robot
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH ovn 10/12] Export `VLOG_WARN` and `VLOG_ERR` from libovn for use in ddlog

2020-11-04 Thread Numan Siddique
On Wed, Nov 4, 2020 at 12:34 PM Ben Pfaff  wrote:
>
> From: Leonid Ryzhyk 
>
> Export `ddlog_warn` and `ddlog_err` functions that are just wrappers
> around `VLOG_WARN` and `VLOG_ERR`.  This is not ideal because the
> functions are exported by `ovn_util.c` and the resulting log messages use
> `ovn_util` as module name.  More importantly, these functions do not do
> log rate limiting.
>
> Signed-off-by: Leonid Ryzhyk 
> Signed-off-by: Ben Pfaff 

Acked-by: Numan Siddique 

Thanks
Numan

> ---
>  lib/ovn-util.c | 17 +
>  lib/ovn-util.h |  6 ++
>  2 files changed, 23 insertions(+)
>
> diff --git a/lib/ovn-util.c b/lib/ovn-util.c
> index abe6b04a7701..eb4f14efffa6 100644
> --- a/lib/ovn-util.c
> +++ b/lib/ovn-util.c
> @@ -722,3 +722,20 @@ ip_address_and_port_from_lb_key(const char *key, char 
> **ip_address,
>  *addr_family = ss.ss_family;
>  return true;
>  }
> +
> +#ifdef DDLOG
> +
> +/* Callbacks used by the ddlog northd code to print warnings and errors.
> + */
> +void
> +ddlog_warn(const char *msg)
> +{
> +VLOG_WARN("%s", msg);
> +}
> +
> +void
> +ddlog_err(const char *msg)
> +{
> +VLOG_ERR("%s", msg);
> +}
> +#endif
> diff --git a/lib/ovn-util.h b/lib/ovn-util.h
> index a39cbef5a47e..77d0936a5fbc 100644
> --- a/lib/ovn-util.h
> +++ b/lib/ovn-util.h
> @@ -230,4 +230,10 @@ char *str_tolower(const char *orig);
>  bool ip_address_and_port_from_lb_key(const char *key, char **ip_address,
>   uint16_t *port, int *addr_family);
>
> +#ifdef DDLOG
> +void ddlog_warn(const char *msg);
> +void ddlog_err(const char *msg);
> +#endif
> +
> +
>  #endif
> --
> 2.26.2
>
> ___
> dev mailing list
> d...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH ovn 10/12] Export `VLOG_WARN` and `VLOG_ERR` from libovn for use in ddlog

2020-11-04 Thread Ben Pfaff
On Wed, Nov 04, 2020 at 11:20:31PM +0530, Numan Siddique wrote:
> On Wed, Nov 4, 2020 at 12:34 PM Ben Pfaff  wrote:
> >
> > From: Leonid Ryzhyk 
> >
> > Export `ddlog_warn` and `ddlog_err` functions that are just wrappers
> > around `VLOG_WARN` and `VLOG_ERR`.  This is not ideal because the
> > functions are exported by `ovn_util.c` and the resulting log messages use
> > `ovn_util` as module name.  More importantly, these functions do not do
> > log rate limiting.
> >
> > Signed-off-by: Leonid Ryzhyk 
> > Signed-off-by: Ben Pfaff 
> 
> Acked-by: Numan Siddique 

Thanks!  I'll keep this one until we're ready to push all of the rest.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev