From b09c603ca40fc6980188f9c7f419c0918a3f461e Mon Sep 17 00:00:00 2001 From: Gang He Date: Wed, 2 May 2018 10:37:48 +0800 Subject: [PATCH] dlm: fix a clerical error when set SCTP_NODELAY There is a clerical error when turn off Nagle's algorithm in sctp_connect_to_sock() function, this results in turn off Nagle's algorithm failure. After this correction, DLM performance will be improved obviously when using SCTP procotol. Signed-off-by: Gang He Signed-off-by: Michal Kubecek Signed-off-by: David Teigland --- fs/dlm/lowcomms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index 5243989..8151252 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c @@ -1080,7 +1080,7 @@ static void sctp_connect_to_sock(struct connection *con) log_print("connecting to %d", con->nodeid); /* Turn off Nagle's algorithm */ - kernel_setsockopt(sock, SOL_TCP, TCP_NODELAY, (char *)&one, + kernel_setsockopt(sock, SOL_SCTP, SCTP_NODELAY, (char *)&one, sizeof(one)); result = sock->ops->connect(sock, (struct sockaddr *)&daddr, addr_len, -- 2.7.4