totemsrp: Fix orf_token stats

Previously, orf_token_tx was only incremented on initial send,
this is obviously wrong and resulted in the TX count being
significantly lower than any RX count. Now we increment it every
time the ORF token is sent or resent.

As a quick test, on a single node system the RX and TX stats
will now match.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
This commit is contained in:
Christine Caulfield 2024-10-24 14:14:00 +01:00 committed by Jan Friesse
parent 749f1cb9a5
commit 14a5e6f361

View File

@ -2933,6 +2933,7 @@ static int orf_token_rtr (
static void token_retransmit (struct totemsrp_instance *instance)
{
instance->stats.orf_token_tx++;
totemnet_token_send (instance->totemnet_context,
instance->orf_token_retransmit,
instance->orf_token_retransmit_size);
@ -3017,6 +3018,7 @@ static int token_send (
return (0);
}
instance->stats.orf_token_tx++;
totemnet_token_send (instance->totemnet_context,
orf_token,
orf_token_size);
@ -3071,7 +3073,6 @@ static int orf_token_send_initial (struct totemsrp_instance *instance)
orf_token.token_seq = SEQNO_START_TOKEN;
orf_token.retrans_flg = 1;
instance->my_set_retrans_flg = 1;
instance->stats.orf_token_tx++;
if (cs_queue_is_empty (&instance->retrans_message_queue) == 1) {
orf_token.retrans_flg = 0;