From: Simon Wilkinson Date: Sun, 1 Apr 2012 16:27:04 +0000 (-0400) Subject: rx: Remove packet burst elements from peer struct X-Git-Tag: openafs-stable-1_8_0pre1~2565 X-Git-Url: https://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=3109a66fb2df8e3f2878938c5b62222e8212c0f1 rx: Remove packet burst elements from peer struct The peer structure contains a number of elements left over from an earlier, burst based, congestion control strategy. As OpenAFS has never implemented this strategy, just remove these elements from the structure, and store 0 values for these elements in the debug packets. Change-Id: Ib50a8ac587890efb483d3c2640ead615d170db34 Reviewed-on: http://gerrit.openafs.org/7006 Reviewed-by: Derrick Brashear Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman --- diff --git a/src/rx/rx.c b/src/rx/rx.c index 98473d1..79ee76a 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -2933,7 +2933,6 @@ rxi_FindPeer(afs_uint32 host, u_short port, pp->host = host; /* set here or in InitPeerParams is zero */ pp->port = port; MUTEX_INIT(&pp->peer_lock, "peer_lock", MUTEX_DEFAULT, 0); - queue_Init(&pp->congestionQueue); queue_Init(&pp->rpcStats); pp->next = rx_peerHashTable[hashIndex]; rx_peerHashTable[hashIndex] = pp; @@ -7275,9 +7274,8 @@ rx_PrintStats(FILE * file) void rx_PrintPeerStats(FILE * file, struct rx_peer *peer) { - fprintf(file, "Peer %x.%d. " "Burst size %d, " "burst wait %d.%06d.\n", - ntohl(peer->host), (int)ntohs(peer->port), (int)peer->burstSize, - (int)peer->burstWait.sec, (int)peer->burstWait.usec); + fprintf(file, "Peer %x.%d.\n", + ntohl(peer->host), (int)ntohs(peer->port)); fprintf(file, " Rtt %d, " "total sent %d, " "resent %d\n", @@ -7652,8 +7650,6 @@ rx_GetServerPeers(osi_socket socket, afs_uint32 remoteAddr, peer->ifMTU = ntohs(peer->ifMTU); peer->idleWhen = ntohl(peer->idleWhen); peer->refCount = ntohs(peer->refCount); - peer->burstWait.sec = ntohl(peer->burstWait.sec); - peer->burstWait.usec = ntohl(peer->burstWait.usec); peer->rtt = ntohl(peer->rtt); peer->rtt_dev = ntohl(peer->rtt_dev); peer->timeout.sec = 0; @@ -7706,10 +7702,10 @@ rx_GetLocalPeers(afs_uint32 peerHost, afs_uint16 peerPort, peerStats->ifMTU = tp->ifMTU; peerStats->idleWhen = tp->idleWhen; peerStats->refCount = tp->refCount; - peerStats->burstSize = tp->burstSize; - peerStats->burst = tp->burst; - peerStats->burstWait.sec = tp->burstWait.sec; - peerStats->burstWait.usec = tp->burstWait.usec; + peerStats->burstSize = 0; + peerStats->burst = 0; + peerStats->burstWait.sec = 0; + peerStats->burstWait.usec = 0; peerStats->rtt = tp->rtt; peerStats->rtt_dev = tp->rtt_dev; peerStats->timeout.sec = 0; diff --git a/src/rx/rx_packet.c b/src/rx/rx_packet.c index 8953541..3652330 100644 --- a/src/rx/rx_packet.c +++ b/src/rx/rx_packet.c @@ -1975,10 +1975,10 @@ rxi_ReceiveDebugPacket(struct rx_packet *ap, osi_socket asocket, tpeer.ifMTU = htons(tp->ifMTU); tpeer.idleWhen = htonl(tp->idleWhen); tpeer.refCount = htons(tp->refCount); - tpeer.burstSize = tp->burstSize; - tpeer.burst = tp->burst; - tpeer.burstWait.sec = htonl(tp->burstWait.sec); - tpeer.burstWait.usec = htonl(tp->burstWait.usec); + tpeer.burstSize = 0; + tpeer.burst = 0; + tpeer.burstWait.sec = 0; + tpeer.burstWait.usec = 0; tpeer.rtt = htonl(tp->rtt); tpeer.rtt_dev = htonl(tp->rtt_dev); tpeer.nSent = htonl(tp->nSent); diff --git a/src/rx/rx_peer.h b/src/rx/rx_peer.h index 347361f..0331e4c 100644 --- a/src/rx/rx_peer.h +++ b/src/rx/rx_peer.h @@ -33,11 +33,6 @@ struct rx_peer { afs_uint32 idleWhen; /* When the refcountwent to zero */ afs_int32 refCount; /* Reference count for this structure (rx_peerHashTable_lock) */ - /* Congestion control parameters */ - u_char burstSize; /* Reinitialization size for the burst parameter */ - u_char burst; /* Number of packets that can be transmitted right now, without pausing */ - struct clock burstWait; /* Delay until new burst is allowed */ - struct rx_queue congestionQueue; /* Calls that are waiting for non-zero burst value */ int rtt; /* Smoothed round trip time, measured in milliseconds/8 */ int rtt_dev; /* Smoothed rtt mean difference, in milliseconds/4 */ int nSent; /* Total number of distinct data packets sent, not including retransmissions */