cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH 0/6] dlm: sctp use fixes
@ 2013-06-14  9:56 michaelc
  2013-06-14  9:56 ` [Cluster-devel] [PATCH 1/6] dlm: clear correct init bit during sctp setup michaelc
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: michaelc @ 2013-06-14  9:56 UTC (permalink / raw)
  To: cluster-devel.redhat.com

The following patches made over Linus's tree fix a handful of bugs
that occur when the initial IP addr cannot be reached when using
SCTP.




^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Cluster-devel] [PATCH 1/6] dlm: clear correct init bit during sctp setup
  2013-06-14  9:56 [Cluster-devel] [PATCH 0/6] dlm: sctp use fixes michaelc
@ 2013-06-14  9:56 ` michaelc
  2013-06-14  9:56 ` [Cluster-devel] [PATCH 2/6] dlm: set sctp assoc id during setup michaelc
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: michaelc @ 2013-06-14  9:56 UTC (permalink / raw)
  To: cluster-devel.redhat.com

From: Mike Christie <michaelc@cs.wisc.edu>

We were clearing the base con's init pending flags, but the
con for the node was the one with the pending bit set.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
---
 fs/dlm/lowcomms.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index d0ccd2f..efbe7af 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -664,7 +664,7 @@ static void process_sctp_notification(struct connection *con,
 
 			/* Send any pending writes */
 			clear_bit(CF_CONNECT_PENDING, &new_con->flags);
-			clear_bit(CF_INIT_PENDING, &con->flags);
+			clear_bit(CF_INIT_PENDING, &new_con->flags);
 			if (!test_and_set_bit(CF_WRITE_PENDING, &new_con->flags)) {
 				queue_work(send_workqueue, &new_con->swork);
 			}
-- 
1.7.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Cluster-devel] [PATCH 2/6] dlm: set sctp assoc id during setup
  2013-06-14  9:56 [Cluster-devel] [PATCH 0/6] dlm: sctp use fixes michaelc
  2013-06-14  9:56 ` [Cluster-devel] [PATCH 1/6] dlm: clear correct init bit during sctp setup michaelc
@ 2013-06-14  9:56 ` michaelc
  2013-06-14  9:56 ` [Cluster-devel] [PATCH 3/6] dlm: clear correct bit during sctp init failure handling michaelc
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: michaelc @ 2013-06-14  9:56 UTC (permalink / raw)
  To: cluster-devel.redhat.com

From: Mike Christie <michaelc@cs.wisc.edu>

sctp_assoc was not getting set so later lookups failed.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
---
 fs/dlm/lowcomms.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index efbe7af..1536599 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -662,6 +662,7 @@ static void process_sctp_notification(struct connection *con,
 			log_print("connecting to %d sctp association %d",
 				 nodeid, (int)sn->sn_assoc_change.sac_assoc_id);
 
+			new_con->sctp_assoc = sn->sn_assoc_change.sac_assoc_id;
 			/* Send any pending writes */
 			clear_bit(CF_CONNECT_PENDING, &new_con->flags);
 			clear_bit(CF_INIT_PENDING, &new_con->flags);
-- 
1.7.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Cluster-devel] [PATCH 3/6] dlm: clear correct bit during sctp init failure handling
  2013-06-14  9:56 [Cluster-devel] [PATCH 0/6] dlm: sctp use fixes michaelc
  2013-06-14  9:56 ` [Cluster-devel] [PATCH 1/6] dlm: clear correct init bit during sctp setup michaelc
  2013-06-14  9:56 ` [Cluster-devel] [PATCH 2/6] dlm: set sctp assoc id during setup michaelc
@ 2013-06-14  9:56 ` michaelc
  2013-06-14  9:56 ` [Cluster-devel] [PATCH 4/6] dlm: try other IPs when sctp init assoc fails michaelc
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: michaelc @ 2013-06-14  9:56 UTC (permalink / raw)
  To: cluster-devel.redhat.com

From: Mike Christie <michaelc@cs.wisc.edu>

We should be testing and cleaing the init pending bit because later
when sctp_init_assoc is recalled it will be checking that it is not set
and set the bit.

We do not want to touch CF_CONNECT_PENDING here because we will queue
swork and process_send_sockets will then call the connect_action function.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
---
 fs/dlm/lowcomms.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index 1536599..87e68dd 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -562,7 +562,7 @@ static void sctp_send_shutdown(sctp_assoc_t associd)
 static void sctp_init_failed_foreach(struct connection *con)
 {
 	con->sctp_assoc = 0;
-	if (test_and_clear_bit(CF_CONNECT_PENDING, &con->flags)) {
+	if (test_and_clear_bit(CF_INIT_PENDING, &con->flags)) {
 		if (!test_and_set_bit(CF_WRITE_PENDING, &con->flags))
 			queue_work(send_workqueue, &con->swork);
 	}
-- 
1.7.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Cluster-devel] [PATCH 4/6] dlm: try other IPs when sctp init assoc fails
  2013-06-14  9:56 [Cluster-devel] [PATCH 0/6] dlm: sctp use fixes michaelc
                   ` (2 preceding siblings ...)
  2013-06-14  9:56 ` [Cluster-devel] [PATCH 3/6] dlm: clear correct bit during sctp init failure handling michaelc
@ 2013-06-14  9:56 ` michaelc
  2013-06-14  9:56 ` [Cluster-devel] [PATCH 5/6] dlm: retry failed SCTP sends michaelc
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: michaelc @ 2013-06-14  9:56 UTC (permalink / raw)
  To: cluster-devel.redhat.com

From: Mike Christie <michaelc@cs.wisc.edu>

Currently, if we cannot create a association to the first IP addr
that is added to DLM, the SCTP init assoc code will just retry
the same IP. This patch adds a simple failover schemes where we
will try one of the addresses that was passed into DLM.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
---
 fs/dlm/lowcomms.c |   61 +++++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 50 insertions(+), 11 deletions(-)

diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index 87e68dd..56015c9 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -126,6 +126,7 @@ struct connection {
 	struct connection *othercon;
 	struct work_struct rwork; /* Receive workqueue */
 	struct work_struct swork; /* Send workqueue */
+	bool try_new_addr;
 };
 #define sock2con(x) ((struct connection *)(x)->sk_user_data)
 
@@ -144,6 +145,7 @@ struct dlm_node_addr {
 	struct list_head list;
 	int nodeid;
 	int addr_count;
+	int curr_addr_index;
 	struct sockaddr_storage *addr[DLM_MAX_ADDR_COUNT];
 };
 
@@ -310,7 +312,7 @@ static int addr_compare(struct sockaddr_storage *x, struct sockaddr_storage *y)
 }
 
 static int nodeid_to_addr(int nodeid, struct sockaddr_storage *sas_out,
-			  struct sockaddr *sa_out)
+			  struct sockaddr *sa_out, bool try_new_addr)
 {
 	struct sockaddr_storage sas;
 	struct dlm_node_addr *na;
@@ -320,8 +322,16 @@ static int nodeid_to_addr(int nodeid, struct sockaddr_storage *sas_out,
 
 	spin_lock(&dlm_node_addrs_spin);
 	na = find_node_addr(nodeid);
-	if (na && na->addr_count)
-		memcpy(&sas, na->addr[0], sizeof(struct sockaddr_storage));
+	if (na && na->addr_count) {
+		if (try_new_addr) {
+			na->curr_addr_index++;
+			if (na->curr_addr_index == na->addr_count)
+				na->curr_addr_index = 0;
+		}
+
+		memcpy(&sas, na->addr[na->curr_addr_index ],
+			sizeof(struct sockaddr_storage));
+	}
 	spin_unlock(&dlm_node_addrs_spin);
 
 	if (!na)
@@ -353,19 +363,22 @@ static int addr_to_nodeid(struct sockaddr_storage *addr, int *nodeid)
 {
 	struct dlm_node_addr *na;
 	int rv = -EEXIST;
+	int addr_i;
 
 	spin_lock(&dlm_node_addrs_spin);
 	list_for_each_entry(na, &dlm_node_addrs, list) {
 		if (!na->addr_count)
 			continue;
 
-		if (!addr_compare(na->addr[0], addr))
-			continue;
-
-		*nodeid = na->nodeid;
-		rv = 0;
-		break;
+		for (addr_i = 0; addr_i < na->addr_count; addr_i++) {
+			if (addr_compare(na->addr[addr_i], addr)) {
+				*nodeid = na->nodeid;
+				rv = 0;
+				goto unlock;
+			}
+		}
 	}
+unlock:
 	spin_unlock(&dlm_node_addrs_spin);
 	return rv;
 }
@@ -561,6 +574,21 @@ static void sctp_send_shutdown(sctp_assoc_t associd)
 
 static void sctp_init_failed_foreach(struct connection *con)
 {
+
+	/*
+	 * Don't try to recover base con and handle race where the
+	 * other node's assoc init creates a assoc and we get that
+	 * notification, then we get a notification that our attempt
+	 * failed due. This happens when we are still trying the primary
+	 * address, but the other node has already tried secondary addrs
+	 * and found one that worked.
+	 */
+	if (!con->nodeid || con->sctp_assoc)
+		return;
+
+	log_print("Retrying SCTP association init for node %d\n", con->nodeid);
+
+	con->try_new_addr = true;
 	con->sctp_assoc = 0;
 	if (test_and_clear_bit(CF_INIT_PENDING, &con->flags)) {
 		if (!test_and_set_bit(CF_WRITE_PENDING, &con->flags))
@@ -663,6 +691,7 @@ static void process_sctp_notification(struct connection *con,
 				 nodeid, (int)sn->sn_assoc_change.sac_assoc_id);
 
 			new_con->sctp_assoc = sn->sn_assoc_change.sac_assoc_id;
+			new_con->try_new_addr = false;
 			/* Send any pending writes */
 			clear_bit(CF_CONNECT_PENDING, &new_con->flags);
 			clear_bit(CF_INIT_PENDING, &new_con->flags);
@@ -984,7 +1013,8 @@ static void sctp_init_assoc(struct connection *con)
 	if (con->retries++ > MAX_CONNECT_RETRIES)
 		return;
 
-	if (nodeid_to_addr(con->nodeid, NULL, (struct sockaddr *)&rem_addr)) {
+	if (nodeid_to_addr(con->nodeid, NULL, (struct sockaddr *)&rem_addr,
+			   con->try_new_addr)) {
 		log_print("no address for nodeid %d", con->nodeid);
 		return;
 	}
@@ -1016,6 +1046,14 @@ static void sctp_init_assoc(struct connection *con)
 	iov[0].iov_base = page_address(e->page)+offset;
 	iov[0].iov_len = len;
 
+	if (rem_addr.ss_family == AF_INET) {
+		struct sockaddr_in *sin = (struct sockaddr_in *)&rem_addr;
+		log_print("Trying to connect to %pI4", &sin->sin_addr.s_addr);
+	} else {
+		struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)&rem_addr;
+		log_print("Trying to connect to %pI6", &sin6->sin6_addr);
+	}
+
 	cmsg = CMSG_FIRSTHDR(&outmessage);
 	cmsg->cmsg_level = IPPROTO_SCTP;
 	cmsg->cmsg_type = SCTP_SNDRCV;
@@ -1024,6 +1062,7 @@ static void sctp_init_assoc(struct connection *con)
 	memset(sinfo, 0x00, sizeof(struct sctp_sndrcvinfo));
 	sinfo->sinfo_ppid = cpu_to_le32(dlm_our_nodeid());
 	outmessage.msg_controllen = cmsg->cmsg_len;
+	sinfo->sinfo_flags |= SCTP_ADDR_OVER;
 
 	ret = kernel_sendmsg(base_con->sock, &outmessage, iov, 1, len);
 	if (ret < 0) {
@@ -1076,7 +1115,7 @@ static void tcp_connect_to_sock(struct connection *con)
 		goto out_err;
 
 	memset(&saddr, 0, sizeof(saddr));
-	result = nodeid_to_addr(con->nodeid, &saddr, NULL);
+	result = nodeid_to_addr(con->nodeid, &saddr, NULL, false);
 	if (result < 0) {
 		log_print("no address for nodeid %d", con->nodeid);
 		goto out_err;
-- 
1.7.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Cluster-devel] [PATCH 5/6] dlm: retry failed SCTP sends
  2013-06-14  9:56 [Cluster-devel] [PATCH 0/6] dlm: sctp use fixes michaelc
                   ` (3 preceding siblings ...)
  2013-06-14  9:56 ` [Cluster-devel] [PATCH 4/6] dlm: try other IPs when sctp init assoc fails michaelc
@ 2013-06-14  9:56 ` michaelc
  2013-06-14  9:56 ` [Cluster-devel] [PATCH 6/6] dlm: disable nagle for SCTP michaelc
  2013-06-14 18:12 ` [Cluster-devel] [PATCH 0/6] dlm: sctp use fixes David Teigland
  6 siblings, 0 replies; 8+ messages in thread
From: michaelc @ 2013-06-14  9:56 UTC (permalink / raw)
  To: cluster-devel.redhat.com

From: Mike Christie <michaelc@cs.wisc.edu>

Currently if a SCTP send fails, we lose the data we were trying
to send because the writequeue_entry is released when we do the send.
When this happens other nodes will then hang waiting for a reply.

This adds support for SCTP to retry the send operation.

I also removed the retry limit for SCTP use, because we want
to make sure we try every path during init time and for longer
failures we want to continually retry in case paths come back up
while trying other paths. We will do this until userspace tells us
to stop.


Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
---
 fs/dlm/lowcomms.c |  104 ++++++++++++++++++++++++++++++++++++++---------------
 1 files changed, 75 insertions(+), 29 deletions(-)

diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index 56015c9..a4fad32 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -607,15 +607,56 @@ static void sctp_init_failed(void)
 	mutex_unlock(&connections_lock);
 }
 
+static void retry_failed_sctp_send(struct connection *recv_con,
+				   struct sctp_send_failed *sn_send_failed,
+				   char *buf)
+{
+	int len = sn_send_failed->ssf_length - sizeof(struct sctp_send_failed);
+	struct dlm_mhandle *mh;
+	struct connection *con;
+	char *retry_buf;
+	int nodeid = sn_send_failed->ssf_info.sinfo_ppid;
+
+	log_print("Retry sending %d bytes to node id %d", len, nodeid);
+
+	con = nodeid2con(nodeid, 0);
+	if (!con) {
+		log_print("Could not look up con for nodeid %d\n",
+			  nodeid);
+		return;
+	}
+
+	mh = dlm_lowcomms_get_buffer(nodeid, len, GFP_NOFS, &retry_buf);
+	if (!mh) {
+		log_print("Could not allocate buf for retry.");
+		return;
+	}
+	memcpy(retry_buf, buf + sizeof(struct sctp_send_failed), len);
+	dlm_lowcomms_commit_buffer(mh);
+
+	/*
+	 * If we got a assoc changed event before the send failed event then
+	 * we only need to retry the send.
+	 */
+	if (con->sctp_assoc) {
+		if (!test_and_set_bit(CF_WRITE_PENDING, &con->flags))
+			queue_work(send_workqueue, &con->swork);
+	} else
+		sctp_init_failed_foreach(con);
+}
+
 /* Something happened to an association */
 static void process_sctp_notification(struct connection *con,
 				      struct msghdr *msg, char *buf)
 {
 	union sctp_notification *sn = (union sctp_notification *)buf;
 
-	if (sn->sn_header.sn_type == SCTP_ASSOC_CHANGE) {
+	switch (sn->sn_header.sn_type) {
+	case SCTP_SEND_FAILED:
+		retry_failed_sctp_send(con, &sn->sn_send_failed, buf);
+		break;
+	case SCTP_ASSOC_CHANGE:
 		switch (sn->sn_assoc_change.sac_state) {
-
 		case SCTP_COMM_UP:
 		case SCTP_RESTART:
 		{
@@ -713,14 +754,10 @@ static void process_sctp_notification(struct connection *con,
 		}
 		break;
 
-		/* We don't know which INIT failed, so clear the PENDING flags
-		 * on them all.  if assoc_id is zero then it will then try
-		 * again */
-
 		case SCTP_CANT_STR_ASSOC:
 		{
+			/* Will retry init when we get the send failed notification */
 			log_print("Can't start SCTP association - retrying");
-			sctp_init_failed();
 		}
 		break;
 
@@ -729,6 +766,8 @@ static void process_sctp_notification(struct connection *con,
 				  (int)sn->sn_assoc_change.sac_assoc_id,
 				  sn->sn_assoc_change.sac_state);
 		}
+	default:
+		; /* fall through */
 	}
 }
 
@@ -988,6 +1027,24 @@ static void free_entry(struct writequeue_entry *e)
 	kfree(e);
 }
 
+/*
+ * writequeue_entry_complete - try to delete and free write queue entry
+ * @e: write queue entry to try to delete
+ * @completed: bytes completed
+ *
+ * writequeue_lock must be held.
+ */
+static void writequeue_entry_complete(struct writequeue_entry *e, int completed)
+{
+	e->offset += completed;
+	e->len -= completed;
+
+	if (e->len == 0 && e->users == 0) {
+		list_del(&e->list);
+		free_entry(e);
+	}
+}
+
 /* Initiate an SCTP association.
    This is a special case of send_to_sock() in that we don't yet have a
    peeled-off socket for this association, so we use the listening socket
@@ -1007,16 +1064,14 @@ static void sctp_init_assoc(struct connection *con)
 	int addrlen;
 	struct kvec iov[1];
 
+	mutex_lock(&con->sock_mutex);
 	if (test_and_set_bit(CF_INIT_PENDING, &con->flags))
-		return;
-
-	if (con->retries++ > MAX_CONNECT_RETRIES)
-		return;
+		goto unlock;
 
 	if (nodeid_to_addr(con->nodeid, NULL, (struct sockaddr *)&rem_addr,
 			   con->try_new_addr)) {
 		log_print("no address for nodeid %d", con->nodeid);
-		return;
+		goto unlock;
 	}
 	base_con = nodeid2con(0, 0);
 	BUG_ON(base_con == NULL);
@@ -1034,17 +1089,17 @@ static void sctp_init_assoc(struct connection *con)
 	if (list_empty(&con->writequeue)) {
 		spin_unlock(&con->writequeue_lock);
 		log_print("writequeue empty for nodeid %d", con->nodeid);
-		return;
+		goto unlock;
 	}
 
 	e = list_first_entry(&con->writequeue, struct writequeue_entry, list);
 	len = e->len;
 	offset = e->offset;
-	spin_unlock(&con->writequeue_lock);
 
 	/* Send the first block off the write queue */
 	iov[0].iov_base = page_address(e->page)+offset;
 	iov[0].iov_len = len;
+	spin_unlock(&con->writequeue_lock);
 
 	if (rem_addr.ss_family == AF_INET) {
 		struct sockaddr_in *sin = (struct sockaddr_in *)&rem_addr;
@@ -1060,7 +1115,7 @@ static void sctp_init_assoc(struct connection *con)
 	cmsg->cmsg_len = CMSG_LEN(sizeof(struct sctp_sndrcvinfo));
 	sinfo = CMSG_DATA(cmsg);
 	memset(sinfo, 0x00, sizeof(struct sctp_sndrcvinfo));
-	sinfo->sinfo_ppid = cpu_to_le32(dlm_our_nodeid());
+	sinfo->sinfo_ppid = cpu_to_le32(con->nodeid);
 	outmessage.msg_controllen = cmsg->cmsg_len;
 	sinfo->sinfo_flags |= SCTP_ADDR_OVER;
 
@@ -1075,15 +1130,12 @@ static void sctp_init_assoc(struct connection *con)
 	}
 	else {
 		spin_lock(&con->writequeue_lock);
-		e->offset += ret;
-		e->len -= ret;
-
-		if (e->len == 0 && e->users == 0) {
-			list_del(&e->list);
-			free_entry(e);
-		}
+		writequeue_entry_complete(e, ret);
 		spin_unlock(&con->writequeue_lock);
 	}
+
+unlock:
+	mutex_unlock(&con->sock_mutex);
 }
 
 /* Connect a new socket to its peer */
@@ -1533,13 +1585,7 @@ static void send_to_sock(struct connection *con)
 		}
 
 		spin_lock(&con->writequeue_lock);
-		e->offset += ret;
-		e->len -= ret;
-
-		if (e->len == 0 && e->users == 0) {
-			list_del(&e->list);
-			free_entry(e);
-		}
+		writequeue_entry_complete(e, ret);
 	}
 	spin_unlock(&con->writequeue_lock);
 out:
-- 
1.7.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Cluster-devel] [PATCH 6/6] dlm: disable nagle for SCTP
  2013-06-14  9:56 [Cluster-devel] [PATCH 0/6] dlm: sctp use fixes michaelc
                   ` (4 preceding siblings ...)
  2013-06-14  9:56 ` [Cluster-devel] [PATCH 5/6] dlm: retry failed SCTP sends michaelc
@ 2013-06-14  9:56 ` michaelc
  2013-06-14 18:12 ` [Cluster-devel] [PATCH 0/6] dlm: sctp use fixes David Teigland
  6 siblings, 0 replies; 8+ messages in thread
From: michaelc @ 2013-06-14  9:56 UTC (permalink / raw)
  To: cluster-devel.redhat.com

From: Mike Christie <michaelc@cs.wisc.edu>

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: Mike Christie <michaelc@cs.wisc.edu>
---
 fs/dlm/lowcomms.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index a4fad32..4f539dd 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -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;
-- 
1.7.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Cluster-devel] [PATCH 0/6] dlm: sctp use fixes
  2013-06-14  9:56 [Cluster-devel] [PATCH 0/6] dlm: sctp use fixes michaelc
                   ` (5 preceding siblings ...)
  2013-06-14  9:56 ` [Cluster-devel] [PATCH 6/6] dlm: disable nagle for SCTP michaelc
@ 2013-06-14 18:12 ` David Teigland
  6 siblings, 0 replies; 8+ messages in thread
From: David Teigland @ 2013-06-14 18:12 UTC (permalink / raw)
  To: cluster-devel.redhat.com

On Fri, Jun 14, 2013 at 04:56:08AM -0500, michaelc at cs.wisc.edu wrote:
> The following patches made over Linus's tree fix a handful of bugs
> that occur when the initial IP addr cannot be reached when using
> SCTP.

Thanks Mike, I've pushed these to the linux-dlm next branch.
Dave



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-06-14 18:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-14  9:56 [Cluster-devel] [PATCH 0/6] dlm: sctp use fixes michaelc
2013-06-14  9:56 ` [Cluster-devel] [PATCH 1/6] dlm: clear correct init bit during sctp setup michaelc
2013-06-14  9:56 ` [Cluster-devel] [PATCH 2/6] dlm: set sctp assoc id during setup michaelc
2013-06-14  9:56 ` [Cluster-devel] [PATCH 3/6] dlm: clear correct bit during sctp init failure handling michaelc
2013-06-14  9:56 ` [Cluster-devel] [PATCH 4/6] dlm: try other IPs when sctp init assoc fails michaelc
2013-06-14  9:56 ` [Cluster-devel] [PATCH 5/6] dlm: retry failed SCTP sends michaelc
2013-06-14  9:56 ` [Cluster-devel] [PATCH 6/6] dlm: disable nagle for SCTP michaelc
2013-06-14 18:12 ` [Cluster-devel] [PATCH 0/6] dlm: sctp use fixes David Teigland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).