[lustre-devel] [PATCH 23/24] lnet: Honor peer timeout of zero

James Simmons jsimmons at infradead.org
Sat Sep 17 22:22:13 PDT 2022


From: Chris Horn <chris.horn at hpe.com>

Zero is a valid value for the peer_timeout parameter (it is supposed
to disable the LNet Peer Health feature used on routers), but DLC
treats zero as uninitialized and assigns the default peer timeout
instead.

HPE-bug-id: LUS-11233
WC-bug-id: https://jira.whamcloud.com/browse/LU-16145
Lustre-commit: eee27c88adc39da36 ("LU-16145 lnet: Honor peer timeout of zero")
Signed-off-by: Chris Horn <chris.horn at hpe.com>
Reviewed-on: https://review.whamcloud.com/48489
Reviewed-by: Frank Sehr <fsehr at whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov at whamcloud.com>
Reviewed-by: Oleg Drokin <green at whamcloud.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
---
 net/lnet/lnet/api-ni.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/lnet/lnet/api-ni.c b/net/lnet/lnet/api-ni.c
index 9bf2860..89c7b99 100644
--- a/net/lnet/lnet/api-ni.c
+++ b/net/lnet/lnet/api-ni.c
@@ -3466,7 +3466,7 @@ static int lnet_add_net_common(struct lnet_net *net,
 lnet_set_tune_defaults(struct lnet_ioctl_config_lnd_tunables *tun)
 {
 	if (tun) {
-		if (!tun->lt_cmn.lct_peer_timeout)
+		if (tun->lt_cmn.lct_peer_timeout < 0)
 			tun->lt_cmn.lct_peer_timeout = DEFAULT_PEER_TIMEOUT;
 		if (!tun->lt_cmn.lct_peer_tx_credits)
 			tun->lt_cmn.lct_peer_tx_credits = DEFAULT_PEER_CREDITS;
-- 
1.8.3.1



More information about the lustre-devel mailing list