From: Mat Martineau <mathew.j.martineau@linux.intel.com>
To: Geliang Tang <geliang.tang@suse.com>
Cc: mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-next 2/3] Squash to "mptcp: infinite mapping receiving"
Date: Wed, 26 Jan 2022 16:05:45 -0800 (PST) [thread overview]
Message-ID: <d16d1a56-7874-644-b87c-9f8b6d5574b@linux.intel.com> (raw)
In-Reply-To: <a73dc6f3911c83cc292f4caa6f94675af2e06364.1643110285.git.geliang.tang@suse.com>
On Tue, 25 Jan 2022, Geliang Tang wrote:
> Add a flag infinite_expect in struct mptcp_subflow_context, to avoid
> resetting the subflow when the infinite map wasn't received.
>
Could you give some more details about this too? Does the reset happen
when the infinite mapping is lost and the peer stops sending MPTCP
options?
I think a flag like infinite_expect may be needed, but with a bit more
complexity to discard in-flight data from the peer until the expected
infinite mapping arrives. Look back at earlier discussions about MP_FAIL
and dropping data:
https://lore.kernel.org/mptcp/DEA13B0F-B535-42A3-95C6-595859A1CD55@apple.com/
> Signed-off-by: Geliang Tang <geliang.tang@suse.com>
> ---
> net/mptcp/protocol.h | 1 +
> net/mptcp/subflow.c | 7 ++++++-
> 2 files changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
> index 6bcf6cbded45..ddaa86acadce 100644
> --- a/net/mptcp/protocol.h
> +++ b/net/mptcp/protocol.h
> @@ -451,6 +451,7 @@ struct mptcp_subflow_context {
> send_fastclose : 1,
> send_infinite_map : 1,
> infinite_sent : 1,
> + infinite_expect : 1,
> rx_eof : 1,
> can_ack : 1, /* only after processing the remote a key */
> disposable : 1, /* ctx can be free at ulp release time */
> diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c
> index c8126986793e..e41161048498 100644
> --- a/net/mptcp/subflow.c
> +++ b/net/mptcp/subflow.c
> @@ -964,7 +964,9 @@ static enum mapping_status get_mapping_status(struct sock *ssk,
>
> data_len = mpext->data_len;
> if (data_len == 0) {
> + pr_debug("infinite mapping received");
> MPTCP_INC_STATS(sock_net(ssk), MPTCP_MIB_INFINITEMAPRX);
> + subflow->infinite_expect = 0;
> subflow->map_data_len = 0;
> return MAPPING_INVALID;
> }
> @@ -1174,12 +1176,15 @@ static bool subflow_check_data_avail(struct sock *ssk)
> tcp_send_active_reset(ssk, GFP_ATOMIC);
> while ((skb = skb_peek(&ssk->sk_receive_queue)))
> sk_eat_skb(ssk, skb);
> + } else {
> + subflow->infinite_expect = 1;
> }
> WRITE_ONCE(subflow->data_avail, 0);
> return true;
> }
>
> - if ((subflow->mp_join || subflow->fully_established) && subflow->map_data_len) {
> + if ((subflow->mp_join || subflow->fully_established) &&
> + !subflow->infinite_expect && subflow->map_data_len) {
> /* fatal protocol error, close the socket.
> * subflow_error_report() will introduce the appropriate barriers
> */
> --
> 2.31.1
>
>
>
--
Mat Martineau
Intel
next prev parent reply other threads:[~2022-01-27 0:05 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-25 11:48 [PATCH mptcp-next 0/3] add mp_fail testcases Geliang Tang
2022-01-25 11:48 ` [PATCH mptcp-next 1/3] Squash to "mptcp: infinite mapping sending" Geliang Tang
2022-01-26 23:58 ` Mat Martineau
2022-01-27 7:30 ` Geliang Tang
2022-01-25 11:49 ` [PATCH mptcp-next 2/3] Squash to "mptcp: infinite mapping receiving" Geliang Tang
2022-01-27 0:05 ` Mat Martineau [this message]
2022-01-25 11:49 ` [PATCH mptcp-next 3/3] selftests: mptcp: add mp_fail testcases Geliang Tang
2022-01-27 0:07 ` Mat Martineau
2022-01-28 17:04 ` Matthieu Baerts
2022-02-07 4:13 ` Geliang Tang
2022-02-07 10:32 ` Matthieu Baerts
2022-02-07 14:08 ` Geliang Tang
2022-02-08 12:26 ` Matthieu Baerts
2022-02-08 15:41 ` Geliang Tang
2022-02-08 16:24 ` Matthieu Baerts
2022-02-08 19:40 ` Matthieu Baerts
2022-02-09 6:23 ` Geliang Tang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d16d1a56-7874-644-b87c-9f8b6d5574b@linux.intel.com \
--to=mathew.j.martineau@linux.intel.com \
--cc=geliang.tang@suse.com \
--cc=mptcp@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.