mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 15:30:14 +00:00
rx: Remove ADAPT_MTU and MISCMTU
Ever since 5bcf626dda
, ADAPT_MTU has
been unconditionally defined. MISCMTU has always been unconditionally
defined, and not used anywhere. Remove both of these, assuming they
are always defined.
Note that ADAPT_MTU != ADAPT_PMTU.
Change-Id: Ie870bde8f84e59e1fe2a09806d8b68936d15f65e
Reviewed-on: http://gerrit.openafs.org/7922
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
This commit is contained in:
parent
09f5a1e605
commit
a3759e0af8
@ -1283,9 +1283,7 @@ afs_SetServerPrefs(struct srvAddr *sa)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
sa->sa_iprank = 0;
|
sa->sa_iprank = 0;
|
||||||
#ifdef ADAPT_MTU
|
|
||||||
ifn = rxi_FindIfnet(sa->sa_ip, &ifad);
|
ifn = rxi_FindIfnet(sa->sa_ip, &ifad);
|
||||||
#endif
|
|
||||||
if (ifn) { /* local, more or less */
|
if (ifn) { /* local, more or less */
|
||||||
#ifdef IFF_LOOPBACK
|
#ifdef IFF_LOOPBACK
|
||||||
if (ifn->if_flags & IFF_LOOPBACK) {
|
if (ifn->if_flags & IFF_LOOPBACK) {
|
||||||
|
@ -365,9 +365,8 @@ rxi_InitPeerParams(struct rx_peer *pp)
|
|||||||
{
|
{
|
||||||
u_short rxmtu;
|
u_short rxmtu;
|
||||||
|
|
||||||
#ifdef ADAPT_MTU
|
#ifndef AFS_SUN5_ENV
|
||||||
# ifndef AFS_SUN5_ENV
|
# ifdef AFS_USERSPACE_IP_ADDR
|
||||||
# ifdef AFS_USERSPACE_IP_ADDR
|
|
||||||
afs_int32 i;
|
afs_int32 i;
|
||||||
afs_int32 mtu;
|
afs_int32 mtu;
|
||||||
|
|
||||||
@ -387,25 +386,25 @@ rxi_InitPeerParams(struct rx_peer *pp)
|
|||||||
pp->ifMTU = rxmtu;
|
pp->ifMTU = rxmtu;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# else /* AFS_USERSPACE_IP_ADDR */
|
# else /* AFS_USERSPACE_IP_ADDR */
|
||||||
rx_ifnet_t ifn;
|
rx_ifnet_t ifn;
|
||||||
|
|
||||||
# if !defined(AFS_SGI62_ENV)
|
# if !defined(AFS_SGI62_ENV)
|
||||||
if (numMyNetAddrs == 0)
|
if (numMyNetAddrs == 0)
|
||||||
(void)rxi_GetIFInfo();
|
(void)rxi_GetIFInfo();
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
ifn = rxi_FindIfnet(pp->host, NULL);
|
ifn = rxi_FindIfnet(pp->host, NULL);
|
||||||
if (ifn) {
|
if (ifn) {
|
||||||
rx_rto_setPeerTimeoutSecs(pp, 2);
|
rx_rto_setPeerTimeoutSecs(pp, 2);
|
||||||
pp->ifMTU = MIN(RX_MAX_PACKET_SIZE, rx_MyMaxSendSize);
|
pp->ifMTU = MIN(RX_MAX_PACKET_SIZE, rx_MyMaxSendSize);
|
||||||
# ifdef IFF_POINTOPOINT
|
# ifdef IFF_POINTOPOINT
|
||||||
if (rx_ifnet_flags(ifn) & IFF_POINTOPOINT) {
|
if (rx_ifnet_flags(ifn) & IFF_POINTOPOINT) {
|
||||||
/* wish we knew the bit rate and the chunk size, sigh. */
|
/* wish we knew the bit rate and the chunk size, sigh. */
|
||||||
rx_rto_setPeerTimeoutSecs(pp, 4);
|
rx_rto_setPeerTimeoutSecs(pp, 4);
|
||||||
pp->ifMTU = RX_PP_PACKET_SIZE;
|
pp->ifMTU = RX_PP_PACKET_SIZE;
|
||||||
}
|
}
|
||||||
# endif /* IFF_POINTOPOINT */
|
# endif /* IFF_POINTOPOINT */
|
||||||
/* Diminish the packet size to one based on the MTU given by
|
/* Diminish the packet size to one based on the MTU given by
|
||||||
* the interface. */
|
* the interface. */
|
||||||
if (rx_ifnet_mtu(ifn) > (RX_IPUDP_SIZE + RX_HEADER_SIZE)) {
|
if (rx_ifnet_mtu(ifn) > (RX_IPUDP_SIZE + RX_HEADER_SIZE)) {
|
||||||
@ -417,8 +416,8 @@ rxi_InitPeerParams(struct rx_peer *pp)
|
|||||||
rx_rto_setPeerTimeoutSecs(pp, 3);
|
rx_rto_setPeerTimeoutSecs(pp, 3);
|
||||||
pp->ifMTU = MIN(RX_REMOTE_PACKET_SIZE, rx_MyMaxSendSize);
|
pp->ifMTU = MIN(RX_REMOTE_PACKET_SIZE, rx_MyMaxSendSize);
|
||||||
}
|
}
|
||||||
# endif /* else AFS_USERSPACE_IP_ADDR */
|
# endif /* else AFS_USERSPACE_IP_ADDR */
|
||||||
# else /* AFS_SUN5_ENV */
|
#else /* AFS_SUN5_ENV */
|
||||||
afs_int32 mtu;
|
afs_int32 mtu;
|
||||||
|
|
||||||
mtu = rxi_FindIfMTU(pp->host);
|
mtu = rxi_FindIfMTU(pp->host);
|
||||||
@ -438,11 +437,7 @@ rxi_InitPeerParams(struct rx_peer *pp)
|
|||||||
pp->ifMTU = rxmtu;
|
pp->ifMTU = rxmtu;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# endif /* AFS_SUN5_ENV */
|
#endif /* AFS_SUN5_ENV */
|
||||||
#else /* ADAPT_MTU */
|
|
||||||
rx_rto_setPeerTimeoutSecs(pp, 2);
|
|
||||||
pp->ifMTU = OLD_MAX_PACKET_SIZE;
|
|
||||||
#endif /* else ADAPT_MTU */
|
|
||||||
pp->ifMTU = rxi_AdjustIfMTU(pp->ifMTU);
|
pp->ifMTU = rxi_AdjustIfMTU(pp->ifMTU);
|
||||||
pp->maxMTU = OLD_MAX_PACKET_SIZE; /* for compatibility with old guys */
|
pp->maxMTU = OLD_MAX_PACKET_SIZE; /* for compatibility with old guys */
|
||||||
pp->natMTU = MIN(pp->ifMTU, OLD_MAX_PACKET_SIZE);
|
pp->natMTU = MIN(pp->ifMTU, OLD_MAX_PACKET_SIZE);
|
||||||
|
@ -14,9 +14,6 @@
|
|||||||
#ifndef _RX_MISC_H_
|
#ifndef _RX_MISC_H_
|
||||||
#define _RX_MISC_H_
|
#define _RX_MISC_H_
|
||||||
|
|
||||||
#define MISCMTU
|
|
||||||
#define ADAPT_MTU
|
|
||||||
|
|
||||||
#if defined(AFS_SUN5_ENV)
|
#if defined(AFS_SUN5_ENV)
|
||||||
#include <sys/sockio.h>
|
#include <sys/sockio.h>
|
||||||
#include <sys/fcntl.h>
|
#include <sys/fcntl.h>
|
||||||
|
@ -685,7 +685,6 @@ rxi_InitPeerParams(struct rx_peer *pp)
|
|||||||
UNLOCK_IF_INIT;
|
UNLOCK_IF_INIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ADAPT_MTU
|
|
||||||
/* try to second-guess IP, and identify which link is most likely to
|
/* try to second-guess IP, and identify which link is most likely to
|
||||||
* be used for traffic to/from this host. */
|
* be used for traffic to/from this host. */
|
||||||
ppaddr = ntohl(pp->host);
|
ppaddr = ntohl(pp->host);
|
||||||
@ -716,10 +715,6 @@ rxi_InitPeerParams(struct rx_peer *pp)
|
|||||||
rx_rto_setPeerTimeoutSecs(pp, 3);
|
rx_rto_setPeerTimeoutSecs(pp, 3);
|
||||||
pp->ifMTU = MIN(rx_MyMaxSendSize, RX_REMOTE_PACKET_SIZE);
|
pp->ifMTU = MIN(rx_MyMaxSendSize, RX_REMOTE_PACKET_SIZE);
|
||||||
}
|
}
|
||||||
#else /* ADAPT_MTU */
|
|
||||||
rx_rto_setPeerTimeoutSecs(pp, 2);
|
|
||||||
pp->ifMTU = MIN(rx_MyMaxSendSize, OLD_MAX_PACKET_SIZE);
|
|
||||||
#endif /* ADAPT_MTU */
|
|
||||||
#if defined(ADAPT_PMTU) && defined(IP_MTU)
|
#if defined(ADAPT_PMTU) && defined(IP_MTU)
|
||||||
sock=socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP);
|
sock=socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP);
|
||||||
if (sock != OSI_NULLSOCKET) {
|
if (sock != OSI_NULLSOCKET) {
|
||||||
|
@ -457,10 +457,8 @@ XCallBackBulk_r(struct host * ahost, struct AFSFid * fids, afs_int32 nfids)
|
|||||||
int j;
|
int j;
|
||||||
struct rx_connection *cb_conn = NULL;
|
struct rx_connection *cb_conn = NULL;
|
||||||
|
|
||||||
#ifdef ADAPT_MTU
|
|
||||||
rx_SetConnDeadTime(ahost->callback_rxcon, 4);
|
rx_SetConnDeadTime(ahost->callback_rxcon, 4);
|
||||||
rx_SetConnHardDeadTime(ahost->callback_rxcon, AFS_HARDDEADTIME);
|
rx_SetConnHardDeadTime(ahost->callback_rxcon, AFS_HARDDEADTIME);
|
||||||
#endif
|
|
||||||
|
|
||||||
code = 0;
|
code = 0;
|
||||||
j = 0;
|
j = 0;
|
||||||
@ -694,10 +692,8 @@ MultiBreakCallBack_r(struct cbstruct cba[], int ncbas,
|
|||||||
multi_to_cba_map[j] = i;
|
multi_to_cba_map[j] = i;
|
||||||
conns[j++] = thishost->callback_rxcon;
|
conns[j++] = thishost->callback_rxcon;
|
||||||
|
|
||||||
#ifdef ADAPT_MTU
|
|
||||||
rx_SetConnDeadTime(thishost->callback_rxcon, 4);
|
rx_SetConnDeadTime(thishost->callback_rxcon, 4);
|
||||||
rx_SetConnHardDeadTime(thishost->callback_rxcon, AFS_HARDDEADTIME);
|
rx_SetConnHardDeadTime(thishost->callback_rxcon, AFS_HARDDEADTIME);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (j) { /* who knows what multi would do with 0 conns? */
|
if (j) { /* who knows what multi would do with 0 conns? */
|
||||||
|
Loading…
Reference in New Issue
Block a user