diff mbox series

[23/24] lnet: Honor peer timeout of zero

Message ID 1663478534-19917-24-git-send-email-jsimmons@infradead.org (mailing list archive)
State New, archived
Headers show
Series lustre: update to 2.15.52 | expand

Commit Message

James Simmons Sept. 18, 2022, 5:22 a.m. UTC
From: Chris Horn <chris.horn@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@hpe.com>
Reviewed-on: https://review.whamcloud.com/48489
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 net/lnet/lnet/api-ni.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

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;