register struct rx_securityClass *securityObject,
int serviceSecurityIndex)
{
- int hashindex;
+ int hashindex, i;
afs_int32 cid;
register struct rx_connection *conn;
conn->delayedAbortEvent = NULL;
conn->abortCount = 0;
conn->error = 0;
+ for (i = 0; i < RX_MAXCALLS; i++) {
+ conn->twind[i] = rx_initSendWindow;
+ conn->rwind[i] = rx_initReceiveWindow;
+ }
RXS_NewConnection(securityObject, conn);
hashindex =
}
call->channel = channel;
call->callNumber = &conn->callNumber[channel];
+ call->rwind = conn->rwind[channel];
+ call->twind = conn->twind[channel];
/* Note that the next expected call number is retained (in
* conn->callNumber[i]), even if we reallocate the call structure
*/
register u_short port, u_short serviceId, afs_uint32 cid,
afs_uint32 epoch, int type, u_int securityIndex)
{
- int hashindex, flag;
+ int hashindex, flag, i;
register struct rx_connection *conn;
hashindex = CONN_HASH(host, port, cid, epoch, type);
MUTEX_ENTER(&rx_connHashTable_lock);
conn->specific = NULL;
rx_SetConnDeadTime(conn, service->connDeadTime);
rx_SetConnIdleDeadTime(conn, service->idleDeadTime);
+ for (i = 0; i < RX_MAXCALLS; i++) {
+ conn->twind[i] = rx_initSendWindow;
+ conn->rwind[i] = rx_initReceiveWindow;
+ }
/* Notify security object of the new connection */
RXS_NewConnection(conn->securityObject, conn);
/* XXXX Connection timeout? */
if (tSize < call->twind) { /* smaller than our send */
call->twind = tSize; /* window, we must send less... */
call->ssthresh = MIN(call->twind, call->ssthresh);
+ call->conn->twind[call->channel] = call->twind;
}
/* Only send jumbograms to 3.4a fileservers. 3.3a RX gets the
*/
if (tSize < call->twind) {
call->twind = tSize;
+ call->conn->twind[call->channel] = call->twind;
call->ssthresh = MIN(call->twind, call->ssthresh);
} else if (tSize > call->twind) {
call->twind = tSize;
+ call->conn->twind[call->channel] = call->twind;
}
/*
}
queue_Init(&call->rq);
call->error = 0;
- call->rwind = rx_initReceiveWindow;
- call->twind = rx_initSendWindow;
+ call->twind = call->conn->twind[call->channel];
+ call->rwind = call->conn->rwind[call->channel];
call->nSoftAcked = 0;
call->nextCwind = 0;
call->nAcks = 0;
* Open the receive window once a thread starts reading packets
*/
if (call->rnext > 1) {
- call->rwind = rx_maxReceiveWindow;
+ call->conn->rwind[call->channel] = call->rwind = rx_maxReceiveWindow;
}
call->nHardAcks = 0;
EXT int rx_minWindow GLOBALSINIT(1);
EXT int rx_initReceiveWindow GLOBALSINIT(16); /* how much to accept */
-EXT int rx_maxReceiveWindow GLOBALSINIT(32); /* how much to accept */
-EXT int rx_initSendWindow GLOBALSINIT(8);
-EXT int rx_maxSendWindow GLOBALSINIT(32);
+EXT int rx_maxReceiveWindow GLOBALSINIT(64); /* how much to accept */
+EXT int rx_initSendWindow GLOBALSINIT(16);
+EXT int rx_maxSendWindow GLOBALSINIT(64);
EXT int rx_nackThreshold GLOBALSINIT(3); /* Number NACKS to trigger congestion recovery */
EXT int rx_nDgramThreshold GLOBALSINIT(4); /* Number of packets before increasing
* packets per datagram */