Skip to contentSkip to conversation

protocol: add comment to smb mb

PATCH In review Florian Westphal 3 participants 3 messages Jan 15, 2020 – Jan 16, 2020

Subsystems (2)
lore
Share & tools
lore

Florian Westphal

author
#0 lore raw

PATCH v2 1/1 protocol: add comment to smb mb

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(+)
net/mptcp/protocol.c +1 -0
index 6df4eb20916c..5dfca0aa7ce4 100644
@@ -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);
 	}
 }
net/mptcp/subflow.c +1 -0
index ae9173040f17..3461789ee605 100644
@@ -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);
 	}
 }
Signature · 1 line
2.24.1
#1 lore raw
Quoted 4 lines · Florian Westphal

squashto: mptcp: add subflow write space signalling and mptcp_poll

v2: also add comment to subflow_write_space.

Thanks Florian. Looks ready to merge.

Mat

Quoted 36 lines
Signed-off-by Florian Westphal <fw(a)strlen.de>

---
net/mptcp/protocol.c | 1 +
net/mptcp/subflow.c | 1 +

2 files changed, 2 insertions(+)
net/mptcp/protocol.c +1 -0
index 6df4eb20916c..5dfca0aa7ce4 100644
@@ -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);
 	}
 }
net/mptcp/subflow.c +1 -0
index ae9173040f17..3461789ee605 100644
@@ -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);
 	}
 }
Signature · 4 lines
2.24.1
_______________________________________________
mptcp mailing list -- mptcp(a)lists.01.org
To unsubscribe send an email to mptcp-leave(a)lists.01.org

--
Mat Martineau
Intel

#2 lore raw

Hi Florian, Mat,

Quoted 8 lines · Mat Martineau
Quoted 4 lines · Florian Westphal

squashto: mptcp: add subflow write space signalling and mptcp_poll

v2: also add comment to subflow_write_space.

Thanks Florian. Looks ready to merge.

Thank you for the patch and the review!

- b3f03b0dab3b: "squashed" in "mptcp: add subflow write space signalling and mptcp_poll"
- 91800c0574b2..57d9c1d91acd: result

Tests + export are in progress

Cheers,
Matt

Signature · 5 lines
Matthieu Baerts | R&D Engineer
matthieu.baerts(a)tessares.net
Tessares SA | Hybrid Access Solutions
www.tessares.net
1 Avenue Jean Monnet, 1348 Louvain-la-Neuve, Belgium