windows-rx-udpbufsize-20080809

LICENSE MIT

Set UdpBufSize to 256K.  Add RxUdpBufSize registry value to permit
runtime configuration.
This commit is contained in:
Jeffrey Altman 2008-08-09 05:52:36 +00:00
parent 4eea9caac3
commit cd316ff51c

View File

@ -560,6 +560,7 @@ int afsd_InitCM(char **reasonP)
DWORD dwValue; DWORD dwValue;
DWORD rx_enable_peer_stats; DWORD rx_enable_peer_stats;
DWORD rx_enable_process_stats; DWORD rx_enable_process_stats;
DWORD rx_udpbufsize = -1;
long traceBufSize; long traceBufSize;
long maxcpus; long maxcpus;
long ltt, ltto; long ltt, ltto;
@ -1062,6 +1063,15 @@ int afsd_InitCM(char **reasonP)
if (rx_extraPackets) if (rx_extraPackets)
afsi_log("RX extraPackets is %d", rx_extraPackets); afsi_log("RX extraPackets is %d", rx_extraPackets);
dummyLen = sizeof(rx_udpbufsize);
code = RegQueryValueEx(parmKey, "RxUdpBufSize", NULL, NULL,
(BYTE *) &rx_udpbufsize, &dummyLen);
if (code != ERROR_SUCCESS) {
rx_udpbufsize = 256*1024;
}
if (rx_udpbufsize)
afsi_log("RX udpbufsize is %d", rx_udpbufsize);
dummyLen = sizeof(rx_mtu); dummyLen = sizeof(rx_mtu);
code = RegQueryValueEx(parmKey, "RxMaxMTU", NULL, NULL, code = RegQueryValueEx(parmKey, "RxMaxMTU", NULL, NULL,
(BYTE *) &rx_mtu, &dummyLen); (BYTE *) &rx_mtu, &dummyLen);
@ -1286,6 +1296,11 @@ int afsd_InitCM(char **reasonP)
afsi_log("rx_SetMaxMTU %d successful", rx_mtu); afsi_log("rx_SetMaxMTU %d successful", rx_mtu);
} }
if ( rx_udpbufsize != -1 ) {
rx_SetUdpBufSize(rx_udpbufsize);
afsi_log("rx_SetUdpBufSize %d", rx_udpbufsize);
}
/* initialize RX, and tell it to listen to the callbackport, /* initialize RX, and tell it to listen to the callbackport,
* which is used for callback RPC messages. * which is used for callback RPC messages.
*/ */