add add_addr_urgent
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest5 patches 1 replyIn review
- v15 patches 3 repliesSuperseded
Changes in v2 from the cover letter
- rebase on export/20210113T185637
- please apply this patchset after the following patchsets:
add IPv4-mapped address support (v5)
mptcp: create subflow for newly added address and testcases (v5)
ADD_ADDR: ports support (v10)
selftests: mptcp: add command line arguments for mptcp_join.sh (v2)
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | mptcp: add mptcp_pm_should_add_signal_send_ack helpernet/ net/ net/ +1 more | +9 | 0 replies | |
| 2/5 | mptcp: simplify mptcp_pm_nl_add_addr_send_ack debug lognet/ | +4 | 1 reply | |
| 3/5 | mptcp: add a new sysctl add_addr_urgentDocumentation/ net/ net/ | +23 | 0 replies | |
| 4/5 | mptcp: add urgent status for ADD_ADDRnet/ net/ net/ | +14 | 0 replies | |
| 5/5 | selftests: mptcp: add add_addr_urgent testcasestools/ | +28 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [MPTCP] [MPTCP][PATCH v2 mptcp-next 0/5] add add_addr_urgent
v2:
- rebase on export/20210113T185637
- please apply this patchset after the following patchsets:
add IPv4-mapped address support (v5)
mptcp: create subflow for newly added address and testcases (v5)
ADD_ADDR: ports support (v10)
selftests: mptcp: add command line arguments for mptcp_join.sh (v2)
v1:
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 solution 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(-)
Signature · 1 line
2.29.2