From cd316ff51c12b8c6dd5c09384bbe1d700735fe3c Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Sat, 9 Aug 2008 05:52:36 +0000 Subject: [PATCH] windows-rx-udpbufsize-20080809 LICENSE MIT Set UdpBufSize to 256K. Add RxUdpBufSize registry value to permit runtime configuration. --- src/WINNT/afsd/afsd_init.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/WINNT/afsd/afsd_init.c b/src/WINNT/afsd/afsd_init.c index b2cc03247a..d22fb1e4c8 100644 --- a/src/WINNT/afsd/afsd_init.c +++ b/src/WINNT/afsd/afsd_init.c @@ -560,6 +560,7 @@ int afsd_InitCM(char **reasonP) DWORD dwValue; DWORD rx_enable_peer_stats; DWORD rx_enable_process_stats; + DWORD rx_udpbufsize = -1; long traceBufSize; long maxcpus; long ltt, ltto; @@ -1062,6 +1063,15 @@ int afsd_InitCM(char **reasonP) if (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); code = RegQueryValueEx(parmKey, "RxMaxMTU", NULL, NULL, (BYTE *) &rx_mtu, &dummyLen); @@ -1286,6 +1296,11 @@ int afsd_InitCM(char **reasonP) 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, * which is used for callback RPC messages. */