rx: Remove packet burst elements from peer struct
authorSimon Wilkinson <sxw@your-file-system.com>
Sun, 1 Apr 2012 16:27:04 +0000 (12:27 -0400)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 9 Apr 2012 23:37:52 +0000 (16:37 -0700)
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 <shadow@dementix.org>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>

src/rx/rx.c
src/rx/rx_packet.c
src/rx/rx_peer.h

index 98473d1..79ee76a 100644 (file)
@@ -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;
index 8953541..3652330 100644 (file)
@@ -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);
index 347361f..0331e4c 100644 (file)
@@ -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 */