From 0debf2d2274db1ea862bfdc2ef767372f1fa77e3 Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Fri, 4 May 2012 17:23:42 -0500 Subject: [PATCH] Call rx_SetNoJumbo earlier For ubik server processes, rx_SetNoJumbo needs to be called before ubik initialization for it to effect the communication between dbservers; otherwise, full database transfers may result in Rx jumbograms on the wire regardless of the jumbo/nojumbo setting. Move the call to rx_SetNoJumbo to before ubik initialization to avoid this. Also move the call to rx_SetNoJumbo to immediately after rx_Init* for all server processes, for consistency. Move similar calls to rx_SetMaxMTU for the same reason. Change-Id: Ic79415829601fcfb4e74e72fbf5711d0c32aaa0c Reviewed-on: http://gerrit.openafs.org/7350 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear --- src/bozo/bosserver.c | 20 ++++++++++---------- src/budb/server.c | 6 +++--- src/kauth/kaserver.c | 6 +++--- src/ptserver/ptserver.c | 20 ++++++++++---------- src/vlserver/vlserver.c | 19 ++++++++++--------- 5 files changed, 36 insertions(+), 35 deletions(-) diff --git a/src/bozo/bosserver.c b/src/bozo/bosserver.c index 4bc6d40d92..5782c4eeb3 100644 --- a/src/bozo/bosserver.c +++ b/src/bozo/bosserver.c @@ -1100,6 +1100,16 @@ main(int argc, char **argv, char **envp) exit(code); } + /* Disable jumbograms */ + rx_SetNoJumbo(); + + if (rxMaxMTU != -1) { + if (rx_SetMaxMTU(rxMaxMTU) != 0) { + bozo_Log("bosserver: rxMaxMTU %d is invalid\n", rxMaxMTU); + exit(1); + } + } + code = LWP_CreateProcess(BozoDaemon, BOZO_LWP_STACKSIZE, /* priority */ 1, /* param */ NULL , "bozo-the-clown", &bozo_pid); @@ -1165,16 +1175,6 @@ main(int argc, char **argv, char **envp) bozo_CreatePidFile("bosserver", NULL, getpid()); } - /* Disable jumbograms */ - rx_SetNoJumbo(); - - if (rxMaxMTU != -1) { - if (rx_SetMaxMTU(rxMaxMTU) != 0) { - bozo_Log("bosserver: rxMaxMTU %d is invalid\n", rxMaxMTU); - exit(1); - } - } - tservice = rx_NewServiceHost(host, 0, /* service id */ 1, "bozo", securityClasses, numClasses, BOZO_ExecuteRequest); diff --git a/src/budb/server.c b/src/budb/server.c index e8516f99e2..11cb7579b7 100644 --- a/src/budb/server.c +++ b/src/budb/server.c @@ -542,6 +542,9 @@ main(int argc, char **argv) } } + /* Disable jumbograms */ + rx_SetNoJumbo(); + code = ubik_ServerInitByInfo (globalConfPtr->myHost, htons(AFSCONF_BUDBPORT), &cellinfo, @@ -557,9 +560,6 @@ main(int argc, char **argv) afsconf_BuildServerSecurityObjects(BU_conf, &securityClasses, &numClasses); - /* Disable jumbograms */ - rx_SetNoJumbo(); - tservice = rx_NewServiceHost(host, 0, BUDB_SERVICE, "BackupDatabase", securityClasses, numClasses, BUDB_ExecuteRequest); diff --git a/src/kauth/kaserver.c b/src/kauth/kaserver.c index 7a45adaf13..e659f1f213 100644 --- a/src/kauth/kaserver.c +++ b/src/kauth/kaserver.c @@ -393,6 +393,9 @@ main(int argc, char *argv[]) } } + /* Disable jumbograms */ + rx_SetNoJumbo(); + if (servers) code = ubik_ServerInit(myHost, htons(AFSCONF_KAUTHPORT), serverList, @@ -409,9 +412,6 @@ main(int argc, char *argv[]) sca[RX_SCINDEX_NULL] = rxnull_NewServerSecurityObject(); - /* Disable jumbograms */ - rx_SetNoJumbo(); - tservice = rx_NewServiceHost(host, 0, KA_AUTHENTICATION_SERVICE, "AuthenticationService", sca, 1, KAA_ExecuteRequest); diff --git a/src/ptserver/ptserver.c b/src/ptserver/ptserver.c index fdb40d79f9..f145b9d65f 100644 --- a/src/ptserver/ptserver.c +++ b/src/ptserver/ptserver.c @@ -506,6 +506,16 @@ main(int argc, char **argv) } } + /* Disable jumbograms */ + rx_SetNoJumbo(); + + if (rxMaxMTU != -1) { + if (rx_SetMaxMTU(rxMaxMTU) != 0) { + printf("rxMaxMTU %d is invalid\n", rxMaxMTU); + PT_EXIT(1); + } + } + code = ubik_ServerInitByInfo(myHost, htons(AFSCONF_PROTPORT), &info, clones, pr_dbaseName, &dbase); @@ -520,16 +530,6 @@ main(int argc, char **argv) afsconf_BuildServerSecurityObjects(prdir, &securityClasses, &numClasses); - /* Disable jumbograms */ - rx_SetNoJumbo(); - - if (rxMaxMTU != -1) { - if (rx_SetMaxMTU(rxMaxMTU) != 0) { - printf("rxMaxMTU %d is invalid\n", rxMaxMTU); - PT_EXIT(1); - } - } - tservice = rx_NewServiceHost(host, 0, PRSRV, "Protection Server", securityClasses, numClasses, PR_ExecuteRequest); diff --git a/src/vlserver/vlserver.c b/src/vlserver/vlserver.c index 9f88278709..477fc17aa5 100644 --- a/src/vlserver/vlserver.c +++ b/src/vlserver/vlserver.c @@ -404,6 +404,16 @@ main(int argc, char **argv) } } + if (!rxJumbograms) { + rx_SetNoJumbo(); + } + if (rxMaxMTU != -1) { + if (rx_SetMaxMTU(rxMaxMTU) != 0) { + printf("rxMaxMTU %d invalid\n", rxMaxMTU); + return -1; + } + } + ubik_nBuffers = 512; ubik_SetClientSecurityProcs(afsconf_ClientAuth, afsconf_UpToDate, tdir); ubik_SetServerSecurityProcs(afsconf_BuildServerSecurityObjects, @@ -417,15 +427,6 @@ main(int argc, char **argv) printf("vlserver: Ubik init failed: %s\n", afs_error_message(code)); exit(2); } - if (!rxJumbograms) { - rx_SetNoJumbo(); - } - if (rxMaxMTU != -1) { - if (rx_SetMaxMTU(rxMaxMTU) != 0) { - printf("rxMaxMTU %d invalid\n", rxMaxMTU); - return -1; - } - } rx_SetRxDeadTime(50); memset(rd_HostAddress, 0, sizeof(rd_HostAddress));