]> Git Repo - linux.git/commit
mptcp: factor out mptcp_connect()
authorPaolo Abeni <[email protected]>
Fri, 21 Oct 2022 22:58:55 +0000 (15:58 -0700)
committerJakub Kicinski <[email protected]>
Tue, 25 Oct 2022 04:13:55 +0000 (21:13 -0700)
commit54f1944ed6d2554475f39a4921dc5422fa692c4f
treee054b5d875d492c97f6221e7773d326ff294253e
parente72e4032637f4646554794ac28a3abecc6c2416d
mptcp: factor out mptcp_connect()

The current MPTCP connect implementation duplicates a bit of inet
code and does not use nor provide a struct proto->connect callback,
which in turn will not fit the upcoming fastopen implementation.

Refactor such implementation to use the common helper, moving the
MPTCP-specific bits into mptcp_connect(). Additionally, avoid an
indirect call to the subflow connect callback.

Note that the fastopen call-path invokes mptcp_connect() while already
holding the subflow socket lock. Explicitly keep track of such path
via a new MPTCP-level flag and handle the locking accordingly.

Additionally, track the connect flags in a new msk field to allow
propagating them to the subflow inet_stream_connect call.

Fixes: d98a82a6afc7 ("mptcp: handle defer connect in mptcp_sendmsg")
Reviewed-by: Mat Martineau <[email protected]>
Signed-off-by: Paolo Abeni <[email protected]>
Signed-off-by: Mat Martineau <[email protected]>
Signed-off-by: Jakub Kicinski <[email protected]>
net/mptcp/protocol.c
net/mptcp/protocol.h
This page took 0.045056 seconds and 4 git commands to generate.