squashing of "subflow: place further subflows on new 'join_list'"
by Paolo Abeni
Hi all,
A tree with the above patch squashed is available at:
https://github.com/pabeni/mptcp/tree/mptcp_net-next_part3_13
(It also contains the mib patches squashing)
Difference from current export is:
---
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index 13767d0ba572..9870243acbcb 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -1071,7 +1071,6 @@ static void mptcp_worker(struct work_struct *work)
long timeo = 0;
lock_sock(sk);
- __mptcp_flush_join_list(msk);
mptcp_clean_una(sk);
__mptcp_move_skbs(msk);
@@ -1085,6 +1084,7 @@ static void mptcp_worker(struct work_struct *work)
if (!dfrag)
goto unlock;
+ __mptcp_flush_join_list(msk);
ssk = mptcp_subflow_get_retrans(msk);
if (!ssk)
goto reset_unlock;
---
Which is intentional, we likely want to try fetching data from the
join_list subflows, too.
I can post a squash-to patches if that is preferable.
/P
2 years, 3 months
[PATCH] topmsg: mptcp: Add path manager interface
by Mat Martineau
Signed-off-by: Mat Martineau <mathew.j.martineau(a)linux.intel.com>
---
.topmsg | 3 +++
1 file changed, 3 insertions(+)
diff --git a/.topmsg b/.topmsg
index 24debf592e14..c5519c3e8cf8 100644
--- a/.topmsg
+++ b/.topmsg
@@ -5,6 +5,9 @@ Add enough of a path manager interface to allow sending of ADD_ADDR
when an incoming MPTCP connection is created. Capable of sending only
a single IPv4 ADD_ADDR option. The 'pm_data' element of the connection
sock will need to be expanded to handle multiple interfaces and IPv6.
+Partial processing of the incoming ADD_ADDR is included so the path
+manager notification of that event happens at the proper time, which
+involves validating the incoming address information.
This is a skeleton interface definition for events generated by
MPTCP.
--
2.25.2
2 years, 3 months
[PATCH v1 0/3] MP_JOIN self-tests fixes
by Paolo Abeni
This series addresses the currently known issues in MP_JOIN self-tests.
Due to some races, without these patches I observe intermittent failures (say
1 out of 3 self-tests fail). With this patches applied, self-tests survived
~200 iterations successfully.
See individual patches for the details.
On top of "mptcp: move msk state update to subflow_syn_recv_sock()"
net/mptcp/pm.c | 40 ++++++++++++++++------
net/mptcp/pm_netlink.c | 23 +++---------
net/mptcp/protocol.c | 1
net/mptcp/protocol.h | 4 +-
tools/testing/selftests/net/mptcp/mptcp_connect.c | 11 ++++--
tools/testing/selftests/net/mptcp/mptcp_join.sh | 8 +++-
6 files changed, 55 insertions(+), 32 deletions(-)
2 years, 3 months
[PATCH] squash-to: mptcp: Add path manager interface
by Mat Martineau
Move some minor changes from "mptcp: Implement path manager interface
commands" to reduce churn within the patch set. Does not cause conflicts
later in the series.
Signed-off-by: Mat Martineau <mathew.j.martineau(a)linux.intel.com>
---
net/mptcp/pm.c | 2 +-
net/mptcp/protocol.h | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/net/mptcp/pm.c b/net/mptcp/pm.c
index f17db5517544..ad837da0193d 100644
--- a/net/mptcp/pm.c
+++ b/net/mptcp/pm.c
@@ -99,7 +99,7 @@ void mptcp_pm_data_init(struct mptcp_sock *msk)
WRITE_ONCE(msk->pm.addr_signal, false);
WRITE_ONCE(msk->pm.accept_addr, false);
WRITE_ONCE(msk->pm.accept_subflow, false);
- msk->pm.status = MPTCP_PM_IDLE;
+ msk->pm.status = 0;
spin_lock_init(&msk->pm.lock);
INIT_WORK(&msk->pm.work, pm_worker);
diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
index 9f9e397eee1e..8d4761ae3951 100644
--- a/net/mptcp/protocol.h
+++ b/net/mptcp/protocol.h
@@ -99,7 +99,6 @@ struct mptcp_addr_info {
};
enum mptcp_pm_status {
- MPTCP_PM_IDLE,
MPTCP_PM_ADD_ADDR_RECEIVED,
MPTCP_PM_ESTABLISHED,
MPTCP_PM_SUBFLOW_ESTABLISHED,
@@ -124,7 +123,7 @@ struct mptcp_pm_data {
u8 add_addr_accept_max;
u8 local_addr_max;
u8 subflows_max;
- enum mptcp_pm_status status;
+ u8 status;
struct work_struct work;
};
--
2.25.2
2 years, 3 months
[PATCH v1 0/4] more MP_JOIN self-tests fixes
by Paolo Abeni
This series bring in more MP_JOIN self-tests fixes.
It also includes a couple of last minute fixes for add_addr hmac, please see
individual patches for detailed info.
With a previous iteration of this series applied, the self-tests survided >
1500 iterations without any failures. This iteration went through smaller
test-cycles, still without issues.
The rebased export branch is available here:
https://github.com/pabeni/mptcp/tree/mptcp_net-next_part3_12
options.c | 25 +++++++++++++------------
protocol.c | 16 +++++++++-------
subflow.c | 4 ++--
3 files changed, 24 insertions(+), 21 deletions(-)
2 years, 3 months
[PATCH] topmsg: mptcp: add netlink based PM
by Mat Martineau
Signed-off-by: Mat Martineau <mathew.j.martineau(a)linux.intel.com>
---
.topmsg | 30 +++---------------------------
1 file changed, 3 insertions(+), 27 deletions(-)
diff --git a/.topmsg b/.topmsg
index bf371916f85e..e1be48166a8c 100644
--- a/.topmsg
+++ b/.topmsg
@@ -1,7 +1,7 @@
From: Paolo Abeni <pabeni(a)redhat.com>
-Subject: [PATCH] mptcp: add netlink based PM
+Subject: [PATCH] mptcp: add netlink-based PM
-Expose to U/S a netlink family to control the PM, setting:
+Expose a new netlink family to userspace to control the PM, setting:
- list of local addresses to be signalled.
- list of local addresses used to created subflows.
@@ -12,35 +12,11 @@ announce the 'signal' list via the ADD_ADDR option. Since we
currently lack the ADD_ADDR echo (and related event) only the
first addr is sent.
-After exhausting the 'annunce' list, the PM tries to create
+After exhausting the 'announce' list, the PM tries to create
subflow for each addr in 'local' list, waiting for each
connection to be completed before attempting the next one.
Idea is to add an additional PM hook for ADD_ADDR echo, to allow
the PM netlink announcing multiple addresses, in sequence.
-v3 -> v4:
- - fixed several NL parsing issues
- - give announce priority to subflow creation
- - added '_PM' prefix to command names
- - renamed 'addr_list' to 'local_addr_list'
- - renamed mptcp_pm_create_subflow_or_signal ->
- mptcp_pm_create_subflow_or_signal_addr
- - renamed mptcp_pm_nl_add_addr ->
- mptcp_pm_nl_add_addr_received
-
-v1 -> v2:
- - explicitly reset pm status to idle after processing a command
- - fix msk pm initialization
- - fix mptcp_pm_nl_add_addr bugs
- - added ifindex support
- - hopefully clearer local function names
- - always use IS_ENABLED(CONFIG_MPTCP_IPV6) instead of
- IS_ENABLED(CONFIG_IPV6)
-
-RFC -> v1:
- - simplified NL API
- - reduced {WRITE,READ}_ONCE boilerplate due to PM changes
- - add check for duplicate addresses
-
Signed-off-by: Paolo Abeni <pabeni(a)redhat.com>
--
2.25.2
2 years, 3 months
[PATCH] topmsg: mptcp: implement and use MPTCP-level retransmission
by Mat Martineau
Signed-off-by: Mat Martineau <mathew.j.martineau(a)linux.intel.com>
---
.topmsg | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.topmsg b/.topmsg
index 33c007398123..d0f9f41aa08f 100644
--- a/.topmsg
+++ b/.topmsg
@@ -2,7 +2,7 @@ From: Paolo Abeni <pabeni(a)redhat.com>
Subject: [PATCH] mptcp: implement and use MPTCP-level retransmission
On timeout event, schedule a work queue to do the retransmission.
-Retransmission code resemple closely sendmsg() implementation and
+Retransmission code closely resembles the sendmsg() implementation and
re-uses mptcp_sendmsg_frag, providing a dummy msghdr - for flags'
sake - and peeking the relevant dfrag from the rtx head.
--
2.25.2
2 years, 3 months
[PATCH] topmsg: mptcp: update per unacked sequence on pkt reception
by Mat Martineau
Signed-off-by: Mat Martineau <mathew.j.martineau(a)linux.intel.com>
---
.topmsg | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.topmsg b/.topmsg
index cdac48fde2f1..7c66c41e6919 100644
--- a/.topmsg
+++ b/.topmsg
@@ -2,7 +2,7 @@ From: Paolo Abeni <pabeni(a)redhat.com>
Subject: [PATCH] mptcp: update per unacked sequence on pkt reception
So that we keep per unacked sequence number consistent; since
-we update per msk data, use an atomic64 cmpxcgh() to protect
+we update per msk data, use an atomic64 cmpxchg() to protect
against concurrent updates from multiple subflows.
Initialize the snd_una at connect()/accept() time.
--
2.25.2
2 years, 3 months
[PATCH] topmsg: mptcp: Implement path manager interface commands
by Mat Martineau
Signed-off-by: Mat Martineau <mathew.j.martineau(a)linux.intel.com>
---
.topmsg | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/.topmsg b/.topmsg
index 4e07f2eb6511..950299549f45 100644
--- a/.topmsg
+++ b/.topmsg
@@ -1,9 +1,8 @@
From: Peter Krystad <peter.krystad(a)linux.intel.com>
Subject: [PATCH] mptcp: Implement path manager interface commands
-Use the addr_signal flag to indicate to the subflow layer
-that a local address may be announced, and call subflow_connect()
-to initiate a secondary subflow.
+Fill in more path manager functionality by adding a worker function and
+modifying the related stub functions to schedule the worker.
Co-developed-by: Florian Westphal <fw(a)strlen.de>
Signed-off-by: Florian Westphal <fw(a)strlen.de>
--
2.25.2
2 years, 3 months
[PATCH 1/2] mptcp: fix compilation error without IPV6
by Matthieu Baerts
net/mptcp/options.c: In function ‘add_addr_hmac_valid’:
net/mptcp/options.c:796:39: error: ‘struct mptcp_options_received’ has no member named ‘addr6’; did you mean ‘addr’?
796 | mp_opt->addr_id, &mp_opt->addr6);
| ^~~~~
| addr
Fixes: 8536089ea875 (mptcp: v1 ADD_ADDR changes: add_addr_hmac_valid)
Signed-off-by: Matthieu Baerts <matthieu.baerts(a)tessares.net>
---
Notes:
to be squashed in "mptcp: Add path manager interface"
net/mptcp/options.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index 1f64619be5c0..919f727cc7de 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -781,7 +781,7 @@ static void update_una(struct mptcp_sock *msk,
static bool add_addr_hmac_valid(struct mptcp_subflow_context *subflow,
struct mptcp_options_received *mp_opt)
{
- u64 hmac;
+ u64 hmac = 0;
if (mp_opt->echo)
return true;
@@ -790,10 +790,12 @@ static bool add_addr_hmac_valid(struct mptcp_subflow_context *subflow,
hmac = add_addr_generate_hmac(subflow->remote_key,
subflow->local_key,
mp_opt->addr_id, &mp_opt->addr);
+#if IS_ENABLED(CONFIG_MPTCP_IPV6)
else
hmac = add_addr6_generate_hmac(subflow->remote_key,
subflow->local_key,
mp_opt->addr_id, &mp_opt->addr6);
+#endif
pr_debug("subflow=%p, ahmac=%llu, mp_opt->ahmac=%llu\n",
subflow, (unsigned long long)hmac,
--
2.25.1
2 years, 3 months