From: Geliang Tang <geliangtang@gmail.com>
To: mptcp@lists.linux.dev
Cc: Geliang Tang <geliangtang@gmail.com>
Subject: [PATCH mptcp-next v5 2/8] mptcp: add last_fully_acked_dss_start_seq in the msk
Date: Sun, 26 Sep 2021 22:29:32 +0800 [thread overview]
Message-ID: <d30c647d6795c98797d3734e618016a30d7db13d.1632666254.git.geliangtang@gmail.com> (raw)
In-Reply-To: <cover.1632666254.git.geliangtang@gmail.com>
This patch added a new member named last_fully_acked_dss_start_seq to the
msk to keep track of the beginning of the last fully-acked data segment.
This would be updated in __mptcp_clean_una.
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
---
net/mptcp/protocol.c | 3 +++
net/mptcp/protocol.h | 1 +
2 files changed, 4 insertions(+)
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index cf8cccfefb51..1cf43073845a 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -1074,6 +1074,7 @@ static void __mptcp_clean_una(struct sock *sk)
WRITE_ONCE(msk->first_pending, mptcp_send_next(sk));
}
+ msk->last_fully_acked_dss_start_seq = dfrag->data_seq;
dfrag_clear(sk, dfrag);
cleaned = true;
}
@@ -2895,6 +2896,7 @@ struct sock *mptcp_sk_clone(const struct sock *sk,
msk->snd_una = msk->write_seq;
msk->wnd_end = msk->snd_nxt + req->rsk_rcv_wnd;
msk->setsockopt_seq = mptcp_sk(sk)->setsockopt_seq;
+ msk->last_fully_acked_dss_start_seq = subflow_req->idsn - 1;
if (mp_opt->suboptions & OPTIONS_MPTCP_MPC) {
msk->can_ack = true;
@@ -3151,6 +3153,7 @@ void mptcp_finish_connect(struct sock *ssk)
WRITE_ONCE(msk->rcv_wnd_sent, ack_seq);
WRITE_ONCE(msk->can_ack, 1);
WRITE_ONCE(msk->snd_una, msk->write_seq);
+ WRITE_ONCE(msk->last_fully_acked_dss_start_seq, subflow->idsn - 1);
mptcp_pm_new_connection(msk, ssk, 0);
diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
index e090a9244f8b..e9064fec0ed2 100644
--- a/net/mptcp/protocol.h
+++ b/net/mptcp/protocol.h
@@ -224,6 +224,7 @@ struct mptcp_sock {
u64 remote_key;
u64 write_seq;
u64 snd_nxt;
+ u64 last_fully_acked_dss_start_seq;
u64 ack_seq;
u64 rcv_wnd_sent;
u64 rcv_data_fin_seq;
--
2.31.1
next prev parent reply other threads:[~2021-09-26 14:29 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-26 14:29 [PATCH mptcp-next v5 0/8] The infinite mapping support Geliang Tang
2021-09-26 14:29 ` [PATCH mptcp-next v5 1/8] mptcp: track and update contiguous data status Geliang Tang
2021-09-28 0:52 ` Mat Martineau
2021-09-28 2:19 ` Geliang Tang
2021-09-26 14:29 ` Geliang Tang [this message]
2021-09-26 14:29 ` [PATCH mptcp-next v5 3/8] mptcp: infinite mapping sending Geliang Tang
2021-09-28 0:32 ` Mat Martineau
2021-09-28 17:08 ` Christoph Paasch
2021-09-26 14:29 ` [PATCH mptcp-next v5 4/8] mptcp: add the fallback check Geliang Tang
2021-09-26 14:29 ` [PATCH mptcp-next v5 5/8] mptcp: infinite mapping receiving Geliang Tang
2021-09-26 14:29 ` [PATCH mptcp-next v5 6/8] mptcp: add mib for infinite map sending Geliang Tang
2021-09-26 14:29 ` [PATCH mptcp-next v5 7/8] selftests: mptcp: add infinite map mibs check Geliang Tang
2021-09-26 14:29 ` [PATCH mptcp-next v5 8/8] 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=d30c647d6795c98797d3734e618016a30d7db13d.1632666254.git.geliangtang@gmail.com \
--to=geliangtang@gmail.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.