From: Geliang Tang <geliangtang at gmail.com>
To: mptcp at lists.01.org
Subject: [MPTCP] [MPTCP][PATCH mptcp-next 0/5] add add_addr_urgent
Date: Wed, 06 Jan 2021 18:22:41 +0800 [thread overview]
Message-ID: <cover.1609925558.git.geliangtang@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3899 bytes --]
This patchset addresses the ADD_ADDR timeout issue, the failure output
looks like this:
12 signal address, ADD_ADDR timeout syn[ ok ] - synack[ ok ] - ack[ ok ]
add[fail] got 2 ADD_ADDR[s] expected 4
- echo [ ok ]
Server ns stats
MPTcpExtMPCapableSYNRX 1 0.0
MPTcpExtMPCapableACKRX 1 0.0
MPTcpExtMPJoinSynRx 1 0.0
MPTcpExtMPJoinAckRx 1 0.0
Client ns stats
MPTcpExtMPJoinSynAckRx 1 0.0
MPTcpExtAddAddr 2 0.0
13 remove single subflow syn[ ok ] - synack[ ok ] - ack[ ok ]
rm [ ok ] - sf [ ok ]
The tasecase needs to send out 4 ADD_ADDR packets in the test process, it's
about 22 round trips when we use 'slow' argument in the testcase.
If we can't send out all the 4 ADD_ADDR packets, the testcase will fail.
Here in the failure case, we only sent out 2 ADD_ADDRs.
But the ADD_ADDR packet cannot sent out immediately, we need to find out a
packet with enough option length space to put in the ADD_ADDR suboption.
So we need to try several times before we can find a suitable packet to
sent out a ADD_ADDR suboption.
I added the following test code to count the ADD_ADDR trying times:
---
@@ -233,6 +233,7 @@ void mptcp_pm_mp_prio_received(struct sock *sk, u8 bkup)
/* path manager helpers */
+static int times = 1;
bool mptcp_pm_add_addr_signal(struct mptcp_sock *msk, unsigned int remaining,
struct mptcp_addr_info *saddr, bool *echo, bool *port)
{
@@ -247,11 +248,14 @@ bool mptcp_pm_add_addr_signal(struct mptcp_sock *msk, unsigned int remaining,
*echo = mptcp_pm_should_add_signal_echo(msk);
*port = mptcp_pm_should_add_signal_port(msk);
- if (remaining < mptcp_add_addr_len(msk->pm.local.family, *echo, *port))
+ if (remaining < mptcp_add_addr_len(msk->pm.local.family, *echo, *port)) {
+ pr_debug("%s remaining=%u times=%d\n", __func__, remaining, times++);
goto out_unlock;
+ }
*saddr = msk->pm.local;
WRITE_ONCE(msk->pm.addr_signal, 0);
+ times = 1;
ret = true;
out_unlock:
---
Then I found that when the ADD_ADDR timeout testcase failed, it had tried
about 20 times to send out the ADD_ADDR. And here the test transmit process
ended, so the last two ADD_ADDRs had no chance to be send out.
We have three solutions to fix this issue:
1. Make the test transmit process more slowly.
2. Make the transmit data biger.
3. Make the ADD_ADDR suboption transmit faster.
The first 2 solutions can partly solve the issue, it makes more round trips
in the tranmit process, and all 4 ADD_ADDRs had more chance to be send out.
But in some cases, the issue is still there.
So I chose the last sulution to fix the issue. This patchset adds the urgent
status for ADD_ADDR, to make sure the ADD_ADDR can be sent out immediately.
Geliang Tang (5):
mptcp: add mptcp_pm_should_add_signal_send_ack helper
mptcp: simplify mptcp_pm_nl_add_addr_send_ack debug log
mptcp: add a new sysctl add_addr_urgent
mptcp: add urgent status for ADD_ADDR
selftests: mptcp: add add_addr_urgent testcases
Documentation/networking/mptcp-sysctl.rst | 8 ++++++
net/mptcp/ctrl.c | 14 ++++++++++
net/mptcp/options.c | 3 +-
net/mptcp/pm.c | 5 ++--
net/mptcp/pm_netlink.c | 13 ++++++---
net/mptcp/protocol.h | 14 ++++++++++
.../testing/selftests/net/mptcp/mptcp_join.sh | 28 +++++++++++++++++++
7 files changed, 77 insertions(+), 8 deletions(-)
--
2.29.2
reply other threads:[~2021-01-06 10:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=cover.1609925558.git.geliangtang@gmail.com \
--to=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