On 1/4/24 14:53, Cheng Li wrote:
> vconn_sent counter is supposed to increase each time send() is
> called, no matter if the vconn log debug is on or off.

Good catch!  But I think the intention was fr it to be increased
each time we successfully sent something, not when the function
was called.  This will match the behavior of the vconn_received
counter.  i.e. we should probably put the counter under if (!retval).

What do you think?

Best regards, Ilya Maximets.

> 
> Signed-off-by: Cheng Li <[email protected]>
> ---
>  lib/vconn.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/vconn.c b/lib/vconn.c
> index b556762..2513b03 100644
> --- a/lib/vconn.c
> +++ b/lib/vconn.c
> @@ -681,8 +681,8 @@ do_send(struct vconn *vconn, struct ofpbuf *msg)
>      ovs_assert(msg->size >= sizeof(struct ofp_header));
>  
>      ofpmsg_update_length(msg);
> +    COVERAGE_INC(vconn_sent);
>      if (!VLOG_IS_DBG_ENABLED()) {
> -        COVERAGE_INC(vconn_sent);
>          retval = (vconn->vclass->send)(vconn, msg);
>      } else {
>          char *s = ofp_to_string(msg->data, msg->size, NULL, NULL, 1);

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

Reply via email to