From: Mat Martineau <mathew.j.martineau@linux.intel.com>
To: Geliang Tang <geliangtang@gmail.com>
Cc: mptcp@lists.linux.dev, Geliang Tang <geliangtang@xiaomi.com>
Subject: Re: [PATCH mptcp-next 3/6] mptcp: infinite mapping receiving
Date: Wed, 8 Sep 2021 17:04:45 -0700 (PDT) [thread overview]
Message-ID: <b8f8ea9b-64cf-982-f5f1-26770456966@linux.intel.com> (raw)
In-Reply-To: <dd69eaf87e848b1de94526a456215411184cc183.1630914699.git.geliangtang@xiaomi.com>
On Mon, 6 Sep 2021, Geliang Tang wrote:
> From: Geliang Tang <geliangtang@xiaomi.com>
>
> This patch added the infinite mapping receiving logic.
>
> Added a new struct member infinite_mapping_rcv in struct
> mptcp_subflow_context, set it true when the infinite mapping is
> received.
>
> In subflow_check_data_avail, if the infinite_mapping_rcv flag is
> set, don't reset this subflow.
>
> Signed-off-by: Geliang Tang <geliangtang@xiaomi.com>
> ---
> net/mptcp/protocol.h | 1 +
> net/mptcp/subflow.c | 4 +++-
> 2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
> index a058af61cf7c..b92b02c2ba61 100644
> --- a/net/mptcp/protocol.h
> +++ b/net/mptcp/protocol.h
> @@ -435,6 +435,7 @@ struct mptcp_subflow_context {
> send_mp_prio : 1,
> send_mp_fail : 1,
> infinite_mapping_snd : 1,
> + infinite_mapping_rcv : 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 87f42ba7c09c..e7ede61c712a 100644
> --- a/net/mptcp/subflow.c
> +++ b/net/mptcp/subflow.c
> @@ -968,6 +968,7 @@ static enum mapping_status get_mapping_status(struct sock *ssk,
> data_len = mpext->data_len;
> if (data_len == 0) {
> MPTCP_INC_STATS(sock_net(ssk), MPTCP_MIB_INFINITEMAPRX);
> + subflow->infinite_mapping_rcv = 1;
> return MAPPING_INVALID;
If this returns MAPPING_INFINITE instead, that enum value can be checked
in subflow_check_data_avail() and infinite_mapping_rcv is not needed.
> }
>
> @@ -1181,7 +1182,7 @@ static bool subflow_check_data_avail(struct sock *ssk)
>
> if (subflow->mp_join ||
> (subflow->fully_established &&
> - !subflow->infinite_mapping_snd)) {
> + !(subflow->infinite_mapping_snd || subflow->infinite_mapping_rcv))) {
> /* fatal protocol error, close the socket.
> * subflow_error_report() will introduce the appropriate barriers
> */
> @@ -1201,6 +1202,7 @@ static bool subflow_check_data_avail(struct sock *ssk)
> subflow->map_data_len = skb->len;
> subflow->map_subflow_seq = tcp_sk(ssk)->copied_seq - subflow->ssn_offset;
> WRITE_ONCE(subflow->data_avail, MPTCP_SUBFLOW_DATA_AVAIL);
> + subflow->infinite_mapping_rcv = 0;
> return true;
> }
>
> --
> 2.31.1
>
>
>
--
Mat Martineau
Intel
next prev parent reply other threads:[~2021-09-09 0:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-06 7:58 [PATCH mptcp-next 0/6] The infinite mapping support Geliang Tang
2021-09-06 7:58 ` [PATCH mptcp-next 1/6] mptcp: add noncontiguous flag Geliang Tang
2021-09-08 23:39 ` Mat Martineau
2021-09-06 7:58 ` [PATCH mptcp-next 2/6] mptcp: infinite mapping sending Geliang Tang
2021-09-09 0:01 ` Mat Martineau
2021-09-06 7:58 ` [PATCH mptcp-next 3/6] mptcp: infinite mapping receiving Geliang Tang
2021-09-09 0:04 ` Mat Martineau [this message]
2021-09-06 7:58 ` [PATCH mptcp-next 4/6] mptcp: add a mib for the infinite mapping sending Geliang Tang
2021-09-06 7:58 ` [PATCH mptcp-next 5/6] selftests: mptcp: add infinite map mibs check Geliang Tang
2021-09-06 7:58 ` [PATCH mptcp-next 6/6] DO-NOT-MERGE: mptcp: mp_fail test 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=b8f8ea9b-64cf-982-f5f1-26770456966@linux.intel.com \
--to=mathew.j.martineau@linux.intel.com \
--cc=geliangtang@gmail.com \
--cc=geliangtang@xiaomi.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox