LICENSE IPL10
FIXES 124880
rxi_Findcbi, rxi_FIndIfnet, rxi_FindIfMTU "failure" end up returning
the RX_REMOTE_PACKET_SIZE as the mtu to use unless we allow our override
to apply, so we do that. then, add an afsd switch to allow setting it.
afsd man page update required and will follow.
====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================
LICENSE IPL10
FIXES 124880
man page update to document previous work
(cherry picked from commit
74df876dafb9cf80ab5a8099b4202f2205bd9791)
[B<-nosettime>]
S<<< [B<-prealloc> <I<number of 'small' preallocated blocks>>] >>>
[B<-rmtsys>] S<<< [B<-rootvol> <I<name of AFS root volume>>] >>>
- [B<-rxbind>] S<<< [B<-rxpck> value for rx_extraPackets ] >>>
+ [B<-rxbind>] S<<< [B<-rxmaxmtu> value for maximum MTU ] >>>
+ S<<< [B<-rxpck> value for rx_extraPackets ] >>>
[B<-settime>] [B<-shutdown>]
S<<< [B<-splitcache> <I<RW/RO ratio>>] >>>
S<<< [B<-stat> <I<number of stat entries>>] >>> [B<-verbose>]
Bind the Rx socket (one interface only).
+=item B<-rxmaxmtu> <I<value for maximum MTU>>
+
+Set a limit for the largest maximum transfer unit (network packet size) that
+the AFS client on this machine will be willing to transmit. This switch can
+be used where an artificial limit on the network precludes packets as large
+as the discoverable MTU from being transmitted successfully.
+
=item B<-rxpck> <I<value for rx_extraPackets>>
Set rx_extraPackets to this value. This sets the number of extra Rx
} else if (parm == AFSOP_SET_RXPCK) {
rx_extraPackets = parm2;
afscall_set_rxpck_received = 1;
+ } else if (parm == AFSOP_SET_RXMAXMTU) {
+ rx_MyMaxSendSize = rx_maxReceiveSizeUser = rx_maxReceiveSize = parm2;
} else
code = EINVAL;
# -logfile Place where to put the logfile (default in <cache>/etc/AFSLog.
# -waitclose make close calls always synchronous (slows em down, tho)
# -files_per_subdir [n] number of files per cache subdir. (def=2048)
+# -rxmaxmtu Max mtu. Useful when using VPN when packets might fragment.
+# a value of 1244 should work.
# -shutdown Shutdown afs daemons
# ---------------------------------------------------------------------------
XXLARGE="-fakestat -stat 4000 -dcache 4000 -daemons 6 -volumes 256 -files 50000"
* -confdir The configuration directory .
* -nosettime Don't keep checking the time to avoid drift (default).
* -settime Keep checking the time to avoid drift.
+ * -rxmaxmtu Set the max mtu to help with VPN issues.
* -verbose Be chatty.
* -disable-dynamic-vcaches Disable the use of -stat value as the starting size of
* the size of the vcache/stat cache pool,
int afsd_verbose = 0; /*Are we being chatty? */
int afsd_debug = 0; /*Are we printing debugging info? */
int afsd_CloseSynch = 0; /*Are closes synchronous or not? */
+int rxmaxmtu = 0; /* Are we forcing a limit on the mtu? */
#ifdef AFS_SGI62_ENV
#define AFSD_INO_T ino64_t
printf("afsd: %s dynamically allocated vcaches\n", ( afsd_dynamic_vcaches ? "enabling" : "disabling" ));
#endif
+ /* set -rxmaxmtu */
+ if (as->parms[35].items) {
+ /* -rxmaxmtu */
+ rxmaxmtu = atoi(as->parms[35].items->data);
+ }
+
/*
* Pull out all the configuration info for the workstation's AFS cache and
* the cellular community we're willing to let our users see.
fullpn_CellInfoFile);
call_syscall(AFSOP_CELLINFO, fullpn_CellInfoFile);
+ if (rxmaxmtu) {
+ if (afsd_verbose)
+ printf("%s: Setting rxmaxmtu in kernel = %d\n", rn, rxmaxmtu);
+ code = call_syscall(AFSOP_SET_RXMAXMTU, rxmaxmtu);
+ if (code)
+ printf("%s: Error seting rxmaxmtu\n", rn);
+ }
+
if (enable_dynroot) {
if (afsd_verbose)
printf("%s: Enabling dynroot support in kernel.\n", rn);
"set the time");
cmd_AddParm(ts, "-rxpck", CMD_SINGLE, CMD_OPTIONAL, "set rx_extraPackets to this value");
cmd_AddParm(ts, "-disable-dynamic-vcaches", CMD_FLAG, CMD_OPTIONAL, "disable stat/vcache cache growing as needed");
+ cmd_AddParm(ts, "-rxmaxmtu", CMD_SINGLE, CMD_OPTIONAL, "set rx max MTU to use");
return (cmd_Dispatch(argc, argv));
}
#define AFSOP_BASIC_INIT 36 /* used to be part of START_AFS */
#define AFSOP_SET_BACKUPTREE 37 /* enable backup tree support */
#define AFSOP_SET_RXPCK 38 /*set rx_extraPackets*/
+#define AFSOP_SET_RXMAXMTU 40 /* set rx_MyMaxSendSize,rx_maxReceiveSizeUser,rx_maxReceiveSize */
/* The range 20-30 is reserved for AFS system offsets in the afs_syscall */
#define AFSCALL_PIOCTL 20
if (i == -1) {
pp->timeout.sec = 3;
/* pp->timeout.usec = 0; */
- pp->ifMTU = RX_REMOTE_PACKET_SIZE;
+ pp->ifMTU = MIN(RX_REMOTE_PACKET_SIZE, rx_MyMaxSendSize);
} else {
pp->timeout.sec = 2;
/* pp->timeout.usec = 0; */
pp->ifMTU = rxmtu;
}
} else { /* couldn't find the interface, so assume the worst */
- pp->ifMTU = RX_REMOTE_PACKET_SIZE;
+ pp->ifMTU = MIN(RX_REMOTE_PACKET_SIZE, rx_MyMaxSendSize);
}
#else /* AFS_USERSPACE_IP_ADDR */
#ifdef AFS_DARWIN80_ENV
} else { /* couldn't find the interface, so assume the worst */
pp->timeout.sec = 3;
/* pp->timeout.usec = 0; */
- pp->ifMTU = RX_REMOTE_PACKET_SIZE;
+ pp->ifMTU = MIN(RX_REMOTE_PACKET_SIZE, rx_MyMaxSendSize);
}
#endif /* else AFS_USERSPACE_IP_ADDR */
#else /* AFS_SUN5_ENV */
if (mtu <= 0) {
pp->timeout.sec = 3;
/* pp->timeout.usec = 0; */
- pp->ifMTU = RX_REMOTE_PACKET_SIZE;
+ pp->ifMTU = MIN(RX_REMOTE_PACKET_SIZE, rx_MyMaxSendSize);
} else {
pp->timeout.sec = 2;
/* pp->timeout.usec = 0; */
pp->ifMTU = rxmtu;
}
} else { /* couldn't find the interface, so assume the worst */
- pp->ifMTU = RX_REMOTE_PACKET_SIZE;
+ pp->ifMTU = MIN(RX_REMOTE_PACKET_SIZE,rx_MyMaxSendSize);
}
#endif /* AFS_SUN5_ENV */
#else /* ADAPT_MTU */