rx_GetMaxSendWindow @258
rx_SetMaxReceiveWindow @259
rx_SetMaxSendWindow @260
+ rx_GetMinPeerTimeout @261
+ rx_SetMinPeerTimeout @262
; for performance testing
rx_TSFPQGlobSize @2001 DATA
peer->rtt = _8THMSEC(rttp) + 8;
peer->rtt_dev = peer->rtt >> 2; /* rtt/2: they're scaled differently */
}
- /* the timeout is RTT + 4*MDEV but no less than 350 msec This is because one end or
- * the other of these connections is usually in a user process, and can
- * be switched and/or swapped out. So on fast, reliable networks, the
- * timeout would otherwise be too short.
- */
- rtt_timeout = MAX(((peer->rtt >> 3) + peer->rtt_dev), 350);
+ /* the timeout is RTT + 4*MDEV but no less than rx_minPeerTimeout msec.
+ * This is because one end or the other of these connections is usually
+ * in a user process, and can be switched and/or swapped out. So on fast,
+ * reliable networks, the timeout would otherwise be too short. */
+ rtt_timeout = MAX(((peer->rtt >> 3) + peer->rtt_dev), rx_minPeerTimeout);
clock_Zero(&(peer->timeout));
clock_Addmsec(&(peer->timeout), rtt_timeout);
return rx_maxSendWindow;
}
+void rx_SetMinPeerTimeout(int timeo)
+{
+ if (timeo >= 1 && timeo < 1000)
+ rx_minPeerTimeout = timeo;
+}
+
+int rx_GetMinPeerTimeout(void)
+{
+ return rx_minPeerTimeout;
+}
+
#ifdef AFS_NT40_ENV
void rx_SetRxDeadTime(int seconds)
#define RX_FAST_ACK_RATE 1 /* as of 3.4, ask for an ack every
* other packet. */
+EXT int rx_minPeerTimeout GLOBALSINIT(350); /* in milliseconds */
EXT int rx_minWindow GLOBALSINIT(1);
EXT int rx_maxWindow GLOBALSINIT(65535); /* twind is u_short */
EXT int rx_initReceiveWindow GLOBALSINIT(16); /* how much to accept */
extern int rx_GetMaxSendWindow(void);
extern void rx_SetMaxReceiveWindow(int packets);
extern void rx_SetMaxSendWindow(int packets);
+extern int rx_GetMinPeerTimeout(void);
+extern void rx_SetMinPeerTimeout(int msecs);
/* rx_kcommon.c */
struct socket;