]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
rxperf: Really set UDP buffer size
authorSimon Wilkinson <sxw@your-file-system.com>
Mon, 27 Sep 2010 10:47:51 +0000 (11:47 +0100)
committerDerrick Brashear <shadow@dementia.org>
Tue, 5 Oct 2010 19:17:45 +0000 (12:17 -0700)
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 <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit e23f3ae22f11433713860b37b89a94b12fd70e8d)
Change-Id: I11dbe7bef29cb1ef105f831b5909f9a611385efb
Reviewed-on: http://gerrit.openafs.org/2926
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/rx/test/rxperf.c

index cef5d894f8e107ca1091b1dc2ab6a920b4f46ec8..aa408244c2ee27fcdb4e99d56678b1f52bd77892 100644 (file)
@@ -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);