protocol: add comment to smb_mb__after_atomic
Subsystems (2)
Florian Westphal
PATCH 1/1 protocol: add comment to smb_mb__after_atomic
squashto: mptcp: add subflow write space signalling and mptcp_poll
msk->flags and sock->flags depend one one another, we first need to disable SEND_SPACE flag (no more wmem available for sending), then enable the write_space callbacks in the tcp core.
--- net/mptcp/protocol.c | 1 + 1 file changed, 1 insertion(+)
net/mptcp/protocol.c +1 -0
@@ -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); } }
Signature · 1 line
2.24.1
Mat Martineau
Quoted 5 lines · Florian Westphal
squashto: mptcp: add subflow write space signalling and
mptcp_poll
msk->flagsandsock->flagsdepend one one another, we first need to disableSEND_SPACEflag (no more wmem available for sending), then enable thewrite_spacecallbacks in the tcp core.
This dependency between msk->flags and sock->flags would also explain the barrier in subflow_write_space(), correct? That barrier is also added in this 'squashto' commit, and could benefit from a similar comment since the access to sock->flags is hidden inside sk_stream_write_space().
Mat
Quoted 24 lines
Signed-off-by Florian Westphal <fw(a)strlen.de>---
net/mptcp/protocol.c| 1 +1 file changed, 1 insertion(+)net/mptcp/protocol.c +1
-0@@ -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); } }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