[PATCH] self-tests: catch poll errors
by Paolo Abeni
Otherwise in case of a poll error, we end-up looping forever.
Squash-to: "mptcp: add basic kselftest for mptcp"
Signed-off-by: Paolo Abeni <pabeni(a)redhat.com>
---
tools/testing/selftests/net/mptcp/mptcp_connect.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.c b/tools/testing/selftests/net/mptcp/mptcp_connect.c
index 5aaf7690dc10..689ea8c8eedc 100644
--- a/tools/testing/selftests/net/mptcp/mptcp_connect.c
+++ b/tools/testing/selftests/net/mptcp/mptcp_connect.c
@@ -340,6 +340,11 @@ static int copyfd_io(int infd, int peerfd, int outfd)
return 4;
}
}
+
+ if (fds.revents & (POLLERR | POLLNVAL)) {
+ perror("poll");
+ return 5;
+ }
}
close(peerfd);
--
2.21.0
2 years, 7 months
[RFC 0/2] IPv6 support
by Peter Krystad
Sharing IPv6 work so far. Simple test shows connection establishment
and data transfer works for a single subflow over link-local IPv6
between two VMs.
Still to do:
- Add selftests.
- Multiple subflows. ADD_ADDR option does not fit in TCP header with DSS,
need to send independent ACK to carry it.
- Possibly split IPv4 and IPv6-specific portions into separate files, or
at least reduce some of the excessive copy-paste in this version.
- Is special handling needed for IPv4-mapped addresses.
Peter Krystad (2):
mptcp: Export low-level routines for IPv6
mptcp: Add IPv6 support
include/net/mptcp.h | 3 +
include/net/tcp.h | 8 ++
net/ipv6/tcp_ipv6.c | 29 ++++--
net/mptcp/ctrl.c | 11 +++
net/mptcp/protocol.c | 152 ++++++++++++++++++++++++++---
net/mptcp/protocol.h | 9 +-
net/mptcp/subflow.c | 225 +++++++++++++++++++++++++++++++++++++------
7 files changed, 388 insertions(+), 49 deletions(-)
--
2.17.2
2 years, 8 months
[PATCH v4 0/9] selftests: add ipv6 support and reduce run time
by Florian Westphal
This is the 4th iteration of the selftest patchset.
Changes since v3:
- get rid of unused variable warnings in patch 2
- get rid of bogus fallthrough in patch 4
- add patch 8: Get rid of redundant test cases, no need to
test tcp fallback for all netns combinations.
- add patch 9: allow to set delay/loss/reordering etc. to use.
Default is random so selftests expose wider combinations.
All changes can be squashed into "mptcp: add basic kselftest for mptcp".
The following changes since commit 117a75c747bfe24c1ba08c295a289204c291f588:
mptcp: Implement basic path manager (2019-10-25 01:30:45 +0000)
are available in the Git repository at:
git://git.breakpoint.cc/fw/mptcp-next.git mptcp_selftest_04
for you to fetch changes up to ffc4ff6abe4fcc1701afa0b924fca7ec88823e1e:
selftests: mptcp: add command line options to override netem/ethtool settings (2019-10-25 14:09:38 +0200)
----------------------------------------------------------------
Florian Westphal (9):
selftests: mptcp: make tc delays random
selftests: mptcp: add accept/getpeer checks
selftests: mptcp: extend mptcp_connect tool for ipv6 family
selftests: mptcp: random ethtool tweaking
selftests: mptcp: allow parallel execution
selftests: mptcp: fix spurious deadlock
selftests: mptcp: track duration of each test
selftests: mptcp: remove the redundant test cases
selftests: mptcp: add command line options to override netem/ethtool settings
tools/testing/selftests/net/mptcp/mptcp_connect.c | 175 +++++++++--
tools/testing/selftests/net/mptcp/mptcp_connect.sh | 326 +++++++++++++++++----
2 files changed, 411 insertions(+), 90 deletions(-)
2 years, 8 months
[PATCH v2 0/2] selftests: increase the new default timeout
by Matthieu Baerts
A new commit from upstream now sets a timeout of 45 seconds per test. That's
too low for MPTCP. We need more.
But increasing the timeout was not working because selftests scripts were
looking for this new 'settings' file in the wrong directory. I am going to send
the first patch upstream as it might be required for other selftests and not
specific to MPTCP.
v2: fix typo in the second patch.
Matthieu Baerts (2):
selftests: settings: tests can be in subsubdirs
selftests:mptcp: increase timeout
tools/testing/selftests/kselftest/runner.sh | 2 +-
tools/testing/selftests/net/mptcp/mptcp_connect.sh | 7 +++++++
tools/testing/selftests/net/mptcp/settings | 1 +
3 files changed, 9 insertions(+), 1 deletion(-)
create mode 100644 tools/testing/selftests/net/mptcp/settings
--
2.20.1
2 years, 8 months
[PATCH v2 0/4] mptcp: switch mptcp_poll to use parent sock wait queue
by Florian Westphal
No major changes, except the rebase on current export branch.
Selftest still passes.
This series is needed for sendmsg refactor, without it we can't
make mptcp sendmsg wait on the mptcp socket wait queue because we don't
get the needed wakeup events from the subflow layer.
The following changes since commit 85c93de446d3fd90e47605ba8ff161bef7558f09:
mptcp: Implement basic path manager (2019-10-23 01:31:04 +0000)
are available in the Git repository at:
git://git.breakpoint.cc/fw/mptcp-next.git mptcp_poll_07
for you to fetch changes up to 864dd47df1293e4b8bfc70be0d459286b6dddc3a:
mptcp: switch mptcp_poll to mptcp socket wait queue (2019-10-23 15:20:28 +0200)
----------------------------------------------------------------
Florian Westphal (4):
mptcp: add and use subflow_write_space
subflow: wake parent mptcp socket on subflow state change
net: tcp: add __tcp_poll helper
mptcp: switch mptcp_poll to mptcp socket wait queue
include/net/tcp.h | 1 +
net/ipv4/tcp.c | 12 ++++++++----
net/mptcp/protocol.c | 4 +++-
net/mptcp/subflow.c | 34 ++++++++++++++++++++++++++++++++++
4 files changed, 46 insertions(+), 5 deletions(-)
2 years, 8 months
[PATCH v3 0/7] selftests: mptcp: increase test coverage
by Florian Westphal
This is resend of my selftest changes. All commits may be sqaushed to
"mptcp: add basic kselftest for mptcp".
1. make tc delays random. This is to make sure mptcp-level retransmits
don't trigger more frequent when delay is large.
Note that the existing selftests always test low delay in the
loopback test case and in the ns1 <-> ns2 case, because there is no
artificial delay in both cases.
2. add accept/getpeername checks to make sure the sockaddr returned
from kernel is the expected endpoint.
3. add ipv6 capability to the test.
This was tested by changing the test script to use TCP <-> TCP and
setting both capture=1 ipv6=true in the script.
The tcpdump shows ipv6 is used.
4. use a random combination of tso/gso/gro. Presence (or lack) of
any of them cause slight changes in behaviour, we should make sure
include as many combinations as possible.
Because test duration is already large (~3m 45s in my vm), don't
add more test cases but instead make it use random combination.
5. allow parallel execution of the test case. This allows you to
run e.g. 10 parallel instances instead of waiting for sequential
completion.
6. Fix a possible deadlock in the test program where both ends
block on write(), waiting for other side to drain the receive buffer.
7. track duration of each test. This is useful to spot bugs in mptcp:
if MPTCP <-> MPTCP test takes 31 seconds but TCP fallback took 3,
something is wrong.
With current export branch, I saw no absurd divergences, so mptcp seems
fine right now.
Average test run time is about 2 minutes after these changes.
The changes are also available via git-pull:
The following changes since commit 85c93de446d3fd90e47605ba8ff161bef7558f09:
mptcp: Implement basic path manager (2019-10-23 01:31:04 +0000)
are available in the Git repository at:
git://git.breakpoint.cc/fw/mptcp-next.git mptcp_selftest_03
for you to fetch changes up to fc53dcc1b003887a25d3efb7238a351dab37ba8f:
selftests: mptcp: track duration of each test (2019-10-23 15:08:17 +0200)
----------------------------------------------------------------
Florian Westphal (7):
selftests: mptcp: make tc delays random
selftests: mptcp: add accept/getpeer checks
selftests: mptcp: extend mptcp_connect tool for ipv6 family
selftests: mptcp: random ethtool tweaking
selftests: allow parallel execution
selftests: fix spurious deadlock
selftests: mptcp: track duration of each test
tools/testing/selftests/net/mptcp/mptcp_connect.c | 176 +++++++++++++---
tools/testing/selftests/net/mptcp/mptcp_connect.sh | 224 +++++++++++++++------
2 files changed, 314 insertions(+), 86 deletions(-)
2 years, 8 months
[PATCH 0/3] Fix issues in prerequisite patches
by Peter Krystad
Fix issues found by Mat in the "IPv6 prerequisite" patch series
when running against the multipath.org implementation.
Peter Krystad (3):
mptcp: fix mistake in path manager interface
mptcp: Save address family when creating socket
mptcp: Use correct address family when creating subflows
net/mptcp/basic.c | 28 ++++++++++++++++------------
net/mptcp/pm.c | 4 ++--
net/mptcp/protocol.c | 1 +
net/mptcp/protocol.h | 1 +
4 files changed, 20 insertions(+), 14 deletions(-)
--
2.17.2
2 years, 8 months
[PATCH 0/2] selftests: increase the new default timeout
by Matthieu Baerts
A new commit from upstream now sets a timeout of 45 seconds per test. That's
too low for MPTCP. We need more.
But increasing the timeout was not working because selftests scripts were
looking for this new 'settings' file in the wrong directory. I am going to send
the first patch upstream as it might be required for other selftests and not
specific to MPTCP.
Matthieu Baerts (2):
selftests: settings: tests can be in subsubdirs
selftests:mptcp: increase timeout
tools/testing/selftests/kselftest/runner.sh | 2 +-
tools/testing/selftests/net/mptcp/mptcp_connect.sh | 7 +++++++
tools/testing/selftests/net/mptcp/settings | 1 +
3 files changed, 9 insertions(+), 1 deletion(-)
create mode 100644 tools/testing/selftests/net/mptcp/settings
--
2.20.1
2 years, 8 months