Commit 86e92ad2 authored by Mike Christie's avatar Mike Christie Committed by David Teigland

dlm: disable nagle for SCTP

For TCP we disable Nagle and I cannot think of why it would be needed
for SCTP. When disabled it seems to improve dlm_lock operations like it
does for TCP.
Signed-off-by: default avatarMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
parent 5d689871
......@@ -1346,6 +1346,7 @@ static int sctp_listen_for_all(void)
int result = -EINVAL, num = 1, i, addr_len;
struct connection *con = nodeid2con(0, GFP_NOFS);
int bufsize = NEEDED_RMEM;
int one = 1;
if (!con)
return -ENOMEM;
......@@ -1380,6 +1381,11 @@ static int sctp_listen_for_all(void)
goto create_delsock;
}
result = kernel_setsockopt(sock, SOL_SCTP, SCTP_NODELAY, (char *)&one,
sizeof(one));
if (result < 0)
log_print("Could not set SCTP NODELAY error %d\n", result);
/* Init con struct */
sock->sk->sk_user_data = con;
con->sock = sock;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment