From 4141bf4084b3f473a8a756b42556c6273cd7c9bd Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Wed, 21 Oct 2009 09:14:51 -0400 Subject: [PATCH] Windows: Add registry entries for rx_SetMinPeerTimeout, rx_SetMaxRecvWindow, rx_SetMaxSendWindow Permit the new rx settings to be configured via the registry and set at startup. LICENSE MIT Reviewed-on: http://gerrit.openafs.org/700 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman --- src/WINNT/afsd/afsd_init.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/WINNT/afsd/afsd_init.c b/src/WINNT/afsd/afsd_init.c index d9f85f348..8760ccde5 100644 --- a/src/WINNT/afsd/afsd_init.c +++ b/src/WINNT/afsd/afsd_init.c @@ -500,6 +500,9 @@ afsd_InitCM(char **reasonP) long maxcpus; long ltt, ltto; long rx_nojumbo; + int rx_max_rwin_size; + int rx_max_swin_size; + int rx_min_peer_timeout; long virtualCache = 0; fschar_t rootCellName[256]; struct rx_service *serverp; @@ -1016,6 +1019,27 @@ afsd_InitCM(char **reasonP) } afsi_log("SMB authentication type is %s", ((smb_authType == SMB_AUTH_NONE)?"NONE":((smb_authType == SMB_AUTH_EXTENDED)?"EXTENDED":"NTLM"))); + dummyLen = sizeof(rx_max_rwin_size); + code = RegQueryValueEx(parmKey, "RxMaxRecvWinSize", NULL, NULL, + (BYTE *) &rx_max_rwin_size, &dummyLen); + if (code == ERROR_SUCCESS) + rx_SetMaxReceiveWindow(rx_max_rwin_size); + afsi_log("Rx Maximum Receive Window Size is %d", rx_GetMaxReceiveWindow()); + + dummyLen = sizeof(rx_max_swin_size); + code = RegQueryValueEx(parmKey, "RxMaxSendWinSize", NULL, NULL, + (BYTE *) &rx_max_swin_size, &dummyLen); + if (code == ERROR_SUCCESS) + rx_SetMaxSendWindow(rx_max_swin_size); + afsi_log("Rx Maximum Send Window Size is %d", rx_GetMaxSendWindow()); + + dummyLen = sizeof(rx_min_peer_timeout); + code = RegQueryValueEx(parmKey, "RxMinPeerTimeout", NULL, NULL, + (BYTE *) &rx_min_peer_timeout, &dummyLen); + if (code == ERROR_SUCCESS) + rx_SetMinPeerTimeout(rx_min_peer_timeout); + afsi_log("Rx Minimum Peer Timeout is %d ms", rx_GetMinPeerTimeout()); + dummyLen = sizeof(rx_nojumbo); code = RegQueryValueEx(parmKey, "RxNoJumbo", NULL, NULL, (BYTE *) &rx_nojumbo, &dummyLen); -- 2.39.5