From fec331439faeba9fbc92d81300bcda655cb300e9 Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Mon, 27 Sep 2010 11:47:51 +0100 Subject: [PATCH] rxperf: Really set UDP buffer size On Unix, the UDP buffer size has to be set before we open any sockets. Otherwise, the default (64k) buffer size is used and never changed. Move the calls to SetUdpBufSize in rxperf.c so that the -u command line option actually has an effect. Reviewed-on: http://gerrit.openafs.org/2855 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e23f3ae22f11433713860b37b89a94b12fd70e8d) Change-Id: I11dbe7bef29cb1ef105f831b5909f9a611385efb Reviewed-on: http://gerrit.openafs.org/2926 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- src/rx/test/rxperf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/rx/test/rxperf.c b/src/rx/test/rxperf.c index cef5d894f..aa408244c 100644 --- a/src/rx/test/rxperf.c +++ b/src/rx/test/rxperf.c @@ -505,6 +505,8 @@ do_server(short port, int nojumbo, int maxmtu, int maxwsize, int minpeertimeout, if (nostats) rx_enable_stats = 0; + rx_SetUdpBufSize(udpbufsz); + ret = rx_Init(htons(port)); if (ret) errx(1, "rx_Init failed"); @@ -523,7 +525,6 @@ do_server(short port, int nojumbo, int maxmtu, int maxwsize, int minpeertimeout, if (minpeertimeout) rx_SetMinPeerTimeout(minpeertimeout); - rx_SetUdpBufSize(udpbufsz); get_sec(1, &secureobj, &secureindex); @@ -796,6 +797,8 @@ do_client(const char *server, short port, char *filename, afs_int32 command, addr = str2addr(server); + rx_SetUdpBufSize(udpbufsz); + ret = rx_Init(0); if (ret) errx(1, "rx_Init failed"); @@ -814,7 +817,6 @@ do_client(const char *server, short port, char *filename, afs_int32 command, if (minpeertimeout) rx_SetMinPeerTimeout(minpeertimeout); - rx_SetUdpBufSize(udpbufsz); get_sec(0, &secureobj, &secureindex); -- 2.39.5