All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH mptcp-next] mptcp: sockopt: add TCP_DEFER_ACCEPT support
@ 2022-05-02 16:36 Florian Westphal
  2022-05-02 19:19 ` mptcp: sockopt: add TCP_DEFER_ACCEPT support: Tests Results MPTCP CI
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Florian Westphal @ 2022-05-02 16:36 UTC (permalink / raw)
  To: mptcp; +Cc: Florian Westphal

Support this via passthrough to the underlaying tcp listener socket.

Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/271
Signed-off-by: Florian Westphal <fw@strlen.de>
---
 net/mptcp/sockopt.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/net/mptcp/sockopt.c b/net/mptcp/sockopt.c
index 826b0c1dae98..423d3826ca1e 100644
--- a/net/mptcp/sockopt.c
+++ b/net/mptcp/sockopt.c
@@ -756,6 +756,18 @@ static int mptcp_setsockopt_v4(struct mptcp_sock *msk, int optname,
 	return -EOPNOTSUPP;
 }
 
+static int mptcp_setsockopt_sol_tcp_defer(struct mptcp_sock *msk, sockptr_t optval,
+					  unsigned int optlen)
+{
+	struct socket *listener;
+
+	listener = __mptcp_nmpc_socket(msk);
+	if (!listener)
+		return 0; /* TCP_DEFER_ACCEPT does not fail */
+
+	return tcp_setsockopt(listener->sk, SOL_TCP, TCP_DEFER_ACCEPT, optval, optlen);
+}
+
 static int mptcp_setsockopt_sol_tcp(struct mptcp_sock *msk, int optname,
 				    sockptr_t optval, unsigned int optlen)
 {
@@ -782,6 +794,8 @@ static int mptcp_setsockopt_sol_tcp(struct mptcp_sock *msk, int optname,
 		return mptcp_setsockopt_sol_tcp_cork(msk, optval, optlen);
 	case TCP_NODELAY:
 		return mptcp_setsockopt_sol_tcp_nodelay(msk, optval, optlen);
+	case TCP_DEFER_ACCEPT:
+		return mptcp_setsockopt_sol_tcp_defer(msk, optval, optlen);
 	}
 
 	return -EOPNOTSUPP;
@@ -1142,6 +1156,7 @@ static int mptcp_getsockopt_sol_tcp(struct mptcp_sock *msk, int optname,
 	case TCP_CONGESTION:
 	case TCP_INFO:
 	case TCP_CC_INFO:
+	case TCP_DEFER_ACCEPT:
 		return mptcp_getsockopt_first_sf_only(msk, SOL_TCP, optname,
 						      optval, optlen);
 	case TCP_INQ:
-- 
2.35.1


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

* Re: mptcp: sockopt: add TCP_DEFER_ACCEPT support: Tests Results
  2022-05-02 16:36 [PATCH mptcp-next] mptcp: sockopt: add TCP_DEFER_ACCEPT support Florian Westphal
@ 2022-05-02 19:19 ` MPTCP CI
  2022-05-05  0:05 ` [PATCH mptcp-next] mptcp: sockopt: add TCP_DEFER_ACCEPT support Mat Martineau
  2022-05-06 19:18 ` Matthieu Baerts
  2 siblings, 0 replies; 4+ messages in thread
From: MPTCP CI @ 2022-05-02 19:19 UTC (permalink / raw)
  To: Florian Westphal; +Cc: mptcp

Hi Florian,

Thank you for your modifications, that's great!

Our CI did some validations and here is its report:

- KVM Validation: normal:
  - Unstable: 1 failed test(s): selftest_simult_flows 🔴:
  - Task: https://cirrus-ci.com/task/5574170854555648
  - Summary: https://api.cirrus-ci.com/v1/artifact/task/5574170854555648/summary/summary.txt

- KVM Validation: debug:
  - Unstable: 3 failed test(s): selftest_diag selftest_mptcp_join selftest_simult_flows - Critical: 1 Call Trace(s) ❌:
  - Task: https://cirrus-ci.com/task/5084536747851776
  - Summary: https://api.cirrus-ci.com/v1/artifact/task/5084536747851776/summary/summary.txt

Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/5259e61b6ad5


If there are some issues, you can reproduce them using the same environment as
the one used by the CI thanks to a docker image, e.g.:

    $ cd [kernel source code]
    $ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
        --pull always mptcp/mptcp-upstream-virtme-docker:latest \
        auto-debug

For more details:

    https://github.com/multipath-tcp/mptcp-upstream-virtme-docker


Please note that despite all the efforts that have been already done to have a
stable tests suite when executed on a public CI like here, it is possible some
reported issues are not due to your modifications. Still, do not hesitate to
help us improve that ;-)

Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (Tessares)

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

* Re: [PATCH mptcp-next] mptcp: sockopt: add TCP_DEFER_ACCEPT support
  2022-05-02 16:36 [PATCH mptcp-next] mptcp: sockopt: add TCP_DEFER_ACCEPT support Florian Westphal
  2022-05-02 19:19 ` mptcp: sockopt: add TCP_DEFER_ACCEPT support: Tests Results MPTCP CI
@ 2022-05-05  0:05 ` Mat Martineau
  2022-05-06 19:18 ` Matthieu Baerts
  2 siblings, 0 replies; 4+ messages in thread
From: Mat Martineau @ 2022-05-05  0:05 UTC (permalink / raw)
  To: Florian Westphal; +Cc: mptcp

On Mon, 2 May 2022, Florian Westphal wrote:

> Support this via passthrough to the underlaying tcp listener socket.
>
> Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/271
> Signed-off-by: Florian Westphal <fw@strlen.de>

Looks good to me:

Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>

> ---
> net/mptcp/sockopt.c | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/net/mptcp/sockopt.c b/net/mptcp/sockopt.c
> index 826b0c1dae98..423d3826ca1e 100644
> --- a/net/mptcp/sockopt.c
> +++ b/net/mptcp/sockopt.c
> @@ -756,6 +756,18 @@ static int mptcp_setsockopt_v4(struct mptcp_sock *msk, int optname,
> 	return -EOPNOTSUPP;
> }
>
> +static int mptcp_setsockopt_sol_tcp_defer(struct mptcp_sock *msk, sockptr_t optval,
> +					  unsigned int optlen)
> +{
> +	struct socket *listener;
> +
> +	listener = __mptcp_nmpc_socket(msk);
> +	if (!listener)
> +		return 0; /* TCP_DEFER_ACCEPT does not fail */
> +
> +	return tcp_setsockopt(listener->sk, SOL_TCP, TCP_DEFER_ACCEPT, optval, optlen);
> +}
> +
> static int mptcp_setsockopt_sol_tcp(struct mptcp_sock *msk, int optname,
> 				    sockptr_t optval, unsigned int optlen)
> {
> @@ -782,6 +794,8 @@ static int mptcp_setsockopt_sol_tcp(struct mptcp_sock *msk, int optname,
> 		return mptcp_setsockopt_sol_tcp_cork(msk, optval, optlen);
> 	case TCP_NODELAY:
> 		return mptcp_setsockopt_sol_tcp_nodelay(msk, optval, optlen);
> +	case TCP_DEFER_ACCEPT:
> +		return mptcp_setsockopt_sol_tcp_defer(msk, optval, optlen);
> 	}
>
> 	return -EOPNOTSUPP;
> @@ -1142,6 +1156,7 @@ static int mptcp_getsockopt_sol_tcp(struct mptcp_sock *msk, int optname,
> 	case TCP_CONGESTION:
> 	case TCP_INFO:
> 	case TCP_CC_INFO:
> +	case TCP_DEFER_ACCEPT:
> 		return mptcp_getsockopt_first_sf_only(msk, SOL_TCP, optname,
> 						      optval, optlen);
> 	case TCP_INQ:
> -- 
> 2.35.1
>
>
>

--
Mat Martineau
Intel

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

* Re: [PATCH mptcp-next] mptcp: sockopt: add TCP_DEFER_ACCEPT support
  2022-05-02 16:36 [PATCH mptcp-next] mptcp: sockopt: add TCP_DEFER_ACCEPT support Florian Westphal
  2022-05-02 19:19 ` mptcp: sockopt: add TCP_DEFER_ACCEPT support: Tests Results MPTCP CI
  2022-05-05  0:05 ` [PATCH mptcp-next] mptcp: sockopt: add TCP_DEFER_ACCEPT support Mat Martineau
@ 2022-05-06 19:18 ` Matthieu Baerts
  2 siblings, 0 replies; 4+ messages in thread
From: Matthieu Baerts @ 2022-05-06 19:18 UTC (permalink / raw)
  To: Florian Westphal; +Cc: mptcp

Hi Florian, Mat,

On 02/05/2022 18:36, Florian Westphal wrote:
> Support this via passthrough to the underlaying tcp listener socket.

Thank you for the patch and the review!

Now in our tree (feat. for net-next) with Mat's RvB tag.

New patches for t/upstream:
- 3476c1a3846c: mptcp: sockopt: add TCP_DEFER_ACCEPT support
- Results: 22856348dac5..9a52d7243fda (export)

Builds and tests are now in progress:

https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export/20220506T191513
https://github.com/multipath-tcp/mptcp_net-next/actions/workflows/build-validation.yml?query=branch:export

Cheers,
Matt
-- 
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net

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

end of thread, other threads:[~2022-05-06 19:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-02 16:36 [PATCH mptcp-next] mptcp: sockopt: add TCP_DEFER_ACCEPT support Florian Westphal
2022-05-02 19:19 ` mptcp: sockopt: add TCP_DEFER_ACCEPT support: Tests Results MPTCP CI
2022-05-05  0:05 ` [PATCH mptcp-next] mptcp: sockopt: add TCP_DEFER_ACCEPT support Mat Martineau
2022-05-06 19:18 ` Matthieu Baerts

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.