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 <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
This commit is contained in:
Andrew Deason 2012-05-04 17:23:42 -05:00 committed by Derrick Brashear
parent a2f523b505
commit 0debf2d227
5 changed files with 36 additions and 35 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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));