On 7/29/21 16:22, Mark Gray wrote:
> Add counters to measure the number of times rconn_run() is
> executed and the number of times rconn_send() must retry
> due to an overflow at the vconn layer.
>
> These counters allow for more effective debugging of buffer
> overflows from rconn_send().
>
> Signed-off-by: Mark Gray <[email protected]>
> ---
> lib/rconn.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/lib/rconn.c b/lib/rconn.c
> index a96b2eb8bf43..e635a7ff6284 100644
> --- a/lib/rconn.c
> +++ b/lib/rconn.c
> @@ -40,6 +40,8 @@ COVERAGE_DEFINE(rconn_discarded);
> COVERAGE_DEFINE(rconn_overflow);
> COVERAGE_DEFINE(rconn_queued);
> COVERAGE_DEFINE(rconn_sent);
> +COVERAGE_DEFINE(rconn_run);
> +COVERAGE_DEFINE(rconn_retry);
>
> /* The connection states have the following meanings:
> *
> @@ -624,6 +626,8 @@ rconn_run(struct rconn *rc)
> int old_state;
> size_t i;
>
> + COVERAGE_INC(rconn_run);
Hi, Mark. I'm not sure what is a value of counting this?
rconn_run() supposed to be called unconditionally and it
doesn't seem very useful to count these calls.
What do you think?
> +
> ovs_mutex_lock(&rc->mutex);
> if (rc->vconn) {
> int error;
> @@ -1132,6 +1136,8 @@ try_send(struct rconn *rc)
> if (retval != EAGAIN) {
> report_error(rc, retval);
> disconnect(rc, retval);
> + } else {
> + COVERAGE_INC(rconn_retry);
It might be better to rename to something like 'rconn_send_retry'.
> }
> return retval;
> }
>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev