All of lore.kernel.org
 help / color / mirror / Atom feed
* [MPTCP] [PATCH v2] protocol: add comment to smb mb
@ 2020-01-15  9:10 Florian Westphal
  0 siblings, 0 replies; only message in thread
From: Florian Westphal @ 2020-01-15  9:10 UTC (permalink / raw)
  To: mptcp

[-- Attachment #1: Type: text/plain, Size: 1189 bytes --]

squashto: mptcp: add subflow write space signalling and mptcp_poll

v2: also add comment to subflow_write_space.

Signed-off-by: Florian Westphal <fw(a)strlen.de>
---
 net/mptcp/protocol.c | 1 +
 net/mptcp/subflow.c  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index 6df4eb20916c..5dfca0aa7ce4 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -547,6 +547,7 @@ static void ssk_check_wmem(struct mptcp_sock *msk, struct sock *ssk)
 	if (sock) {
 		clear_bit(MPTCP_SEND_SPACE, &msk->flags);
 		smp_mb__after_atomic();
+		/* set NOSPACE only after clearing SEND_SPACE flag */
 		set_bit(SOCK_NOSPACE, &sock->flags);
 	}
 }
diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c
index ae9173040f17..3461789ee605 100644
--- a/net/mptcp/subflow.c
+++ b/net/mptcp/subflow.c
@@ -727,6 +727,7 @@ static void subflow_write_space(struct sock *sk)
 	if (parent && sk_stream_is_writeable(sk)) {
 		set_bit(MPTCP_SEND_SPACE, &mptcp_sk(parent)->flags);
 		smp_mb__after_atomic();
+		/* set SEND_SPACE before sk_stream_write_space clears NOSPACE */
 		sk_stream_write_space(parent);
 	}
 }
-- 
2.24.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-01-15  9:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-15  9:10 [MPTCP] [PATCH v2] protocol: add comment to smb mb Florian Westphal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.