mirror of
https://git.openafs.org/openafs.git
synced 2025-01-20 16:00:12 +00:00
Windows: Reduce number of Nat Ping Connections
Instruct rx library to only perform NAT pings on file server connections that are actively in use and which are anonymous. LICENSE MIT Change-Id: I6b74e8070f2c522ed13e0c06ea7a304cce525ab9 Reviewed-on: http://gerrit.openafs.org/2077 Reviewed-by: Jeffrey Altman <jaltman@openafs.org> Tested-by: Jeffrey Altman <jaltman@openafs.org> Reviewed-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
parent
7e9c978b1c
commit
64e08dca0b
@ -1096,6 +1096,7 @@ void cm_GCConnections(cm_server_t *serverp)
|
|||||||
cm_PutServer(tcp->serverp);
|
cm_PutServer(tcp->serverp);
|
||||||
cm_ReleaseUser(userp);
|
cm_ReleaseUser(userp);
|
||||||
*lcpp = tcp->nextp;
|
*lcpp = tcp->nextp;
|
||||||
|
rx_SetConnSecondsUntilNatPing(tcp->rxconnp, 0);
|
||||||
rx_DestroyConnection(tcp->rxconnp);
|
rx_DestroyConnection(tcp->rxconnp);
|
||||||
lock_FinalizeMutex(&tcp->mx);
|
lock_FinalizeMutex(&tcp->mx);
|
||||||
free(tcp);
|
free(tcp);
|
||||||
@ -1162,8 +1163,15 @@ static void cm_NewRXConnection(cm_conn_t *tcp, cm_ucell_t *ucellp,
|
|||||||
rx_SetConnDeadTime(tcp->rxconnp, ConnDeadtimeout);
|
rx_SetConnDeadTime(tcp->rxconnp, ConnDeadtimeout);
|
||||||
rx_SetConnHardDeadTime(tcp->rxconnp, HardDeadtimeout);
|
rx_SetConnHardDeadTime(tcp->rxconnp, HardDeadtimeout);
|
||||||
rx_SetConnIdleDeadTime(tcp->rxconnp, IdleDeadtimeout);
|
rx_SetConnIdleDeadTime(tcp->rxconnp, IdleDeadtimeout);
|
||||||
if (NatPingInterval)
|
|
||||||
|
/*
|
||||||
|
* Attempt to limit NAT pings to the anonymous file server connections.
|
||||||
|
* Only file servers implement client callbacks and we only need one ping
|
||||||
|
* to be sent to each server.
|
||||||
|
*/
|
||||||
|
if (NatPingInterval && serverp->type == CM_SERVER_FILE && secIndex == 0)
|
||||||
rx_SetConnSecondsUntilNatPing(tcp->rxconnp, NatPingInterval);
|
rx_SetConnSecondsUntilNatPing(tcp->rxconnp, NatPingInterval);
|
||||||
|
|
||||||
tcp->ucgen = ucellp->gen;
|
tcp->ucgen = ucellp->gen;
|
||||||
if (secObjp)
|
if (secObjp)
|
||||||
rxs_Release(secObjp); /* Decrement the initial refCount */
|
rxs_Release(secObjp); /* Decrement the initial refCount */
|
||||||
@ -1228,6 +1236,7 @@ long cm_ConnByServer(cm_server_t *serverp, cm_user_t *userp, cm_conn_t **connpp)
|
|||||||
else
|
else
|
||||||
osi_Log0(afsd_logp, "cm_ConnByServer replace connection due to crypt change");
|
osi_Log0(afsd_logp, "cm_ConnByServer replace connection due to crypt change");
|
||||||
tcp->flags &= ~CM_CONN_FLAG_FORCE_NEW;
|
tcp->flags &= ~CM_CONN_FLAG_FORCE_NEW;
|
||||||
|
rx_SetConnSecondsUntilNatPing(tcp->rxconnp, 0);
|
||||||
rx_DestroyConnection(tcp->rxconnp);
|
rx_DestroyConnection(tcp->rxconnp);
|
||||||
cm_NewRXConnection(tcp, ucellp, serverp);
|
cm_NewRXConnection(tcp, ucellp, serverp);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user