]> 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)
committerJeffrey Altman <jaltman@openafs.org>
Mon, 27 Sep 2010 14:40:26 +0000 (07:40 -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.

Change-Id: Ic925faabca8264c0359693e97c2ab5b637902797
Reviewed-on: http://gerrit.openafs.org/2855
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.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);