Skip to content

Commit

Permalink
vconn: Count vconn_sent regardless of log level.
Browse files Browse the repository at this point in the history
vconn_sent counter is supposed to increase each time send() return
0, no matter if the vconn log debug is on or off.

Acked-by: Eelco Chaudron <[email protected]>
Signed-off-by: Cheng Li <[email protected]>
Signed-off-by: Ilya Maximets <[email protected]>
  • Loading branch information
Cheng Li authored and igsilya committed Jan 8, 2024
1 parent 94f202f commit b388a1f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/vconn.c
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,6 @@ do_send(struct vconn *vconn, struct ofpbuf *msg)

ofpmsg_update_length(msg);
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);
Expand All @@ -693,6 +692,9 @@ do_send(struct vconn *vconn, struct ofpbuf *msg)
}
free(s);
}
if (!retval) {
COVERAGE_INC(vconn_sent);
}
return retval;
}

Expand Down

0 comments on commit b388a1f

Please sign in to comment.