From c4c0c67fb6afc30a97c93552d00460b3291ac872 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Fri, 10 Jul 2009 20:43:13 -0400 Subject: [PATCH] Correct computation of rx packet resends and data packets sent. rx packet resends were being double counted. rx data packets sent were one more per send list than it should have been. LICENSE MIT Reviewed-on: http://gerrit.openafs.org/54 Verified-by: Russ Allbery Reviewed-by: Russ Allbery --- src/rx/rx.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/rx/rx.c b/src/rx/rx.c index fdff269..63ed366 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -5052,7 +5052,7 @@ rxi_SendList(struct rx_call *call, struct rx_packet **list, int len, if (resending) peer->reSends += len; if (rx_stats_active) - rx_MutexIncrement(rx_stats.dataPacketsSent, rx_stats_mutex); + rx_MutexAdd(rx_stats.dataPacketsSent, len, rx_stats_mutex); MUTEX_EXIT(&peer->peer_lock); if (list[len - 1]->header.flags & RX_LAST_PACKET) { @@ -5099,14 +5099,6 @@ rxi_SendList(struct rx_call *call, struct rx_packet **list, int len, } } - MUTEX_ENTER(&peer->peer_lock); - peer->nSent++; - if (resending) - peer->reSends++; - if (rx_stats_active) - rx_MutexIncrement(rx_stats.dataPacketsSent, rx_stats_mutex); - MUTEX_EXIT(&peer->peer_lock); - /* Tag this packet as not being the last in this group, * for the receiver's benefit */ if (i < len - 1 || moreFlag) { -- 1.9.4