[PATCH mptcp-next] Squash to "mptcp: netlink: allow userspace-driven subflow establishment"

Matthieu Baerts posted 1 patch 2 years ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/20220415162801.1675860-1-matthieu.baerts@tessares.net
Maintainers: Jakub Kicinski <kuba@kernel.org>, Matthieu Baerts <matthieu.baerts@tessares.net>, "David S. Miller" <davem@davemloft.net>, Paolo Abeni <pabeni@redhat.com>, Mat Martineau <mathew.j.martineau@linux.intel.com>
net/mptcp/pm_userspace.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
[PATCH mptcp-next] Squash to "mptcp: netlink: allow userspace-driven subflow establishment"
Posted by Matthieu Baerts 2 years ago
Fix a compilation warning without CONFIG_IPV6 but with CONFIG_MPTCP:

  net/mptcp/pm_userspace.c: In function 'mptcp_nl_find_ssk':
  net/mptcp/pm_userspace.c:309:28: error: unused variable 'pinfo' [-Werror=unused-variable]
    309 |   const struct ipv6_pinfo *pinfo;
        |                            ^~~~~

Reported by the CI:

  https://github.com/multipath-tcp/mptcp_net-next/runs/6039191808?check_suite_focus=true#step%3A6%3A10367=

That's a shame these warnings were ignored :)

Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
---

Notes:
    to be squashed in "mptcp: netlink: allow userspace-driven subflow establishment"

 net/mptcp/pm_userspace.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/net/mptcp/pm_userspace.c b/net/mptcp/pm_userspace.c
index 735ff7ff71af..fce61530fe9e 100644
--- a/net/mptcp/pm_userspace.c
+++ b/net/mptcp/pm_userspace.c
@@ -306,7 +306,6 @@ static struct sock *mptcp_nl_find_ssk(struct mptcp_sock *msk,
 	lock_sock(sk);
 
 	mptcp_for_each_subflow(msk, subflow) {
-		const struct ipv6_pinfo *pinfo;
 		const struct inet_sock *issk;
 		struct sock *ssk;
 
@@ -324,12 +323,14 @@ static struct sock *mptcp_nl_find_ssk(struct mptcp_sock *msk,
 				continue;
 			break;
 #if IS_ENABLED(CONFIG_MPTCP_IPV6)
-		case AF_INET6:
-			pinfo = inet6_sk(ssk);
+		case AF_INET6: {
+			const struct ipv6_pinfo *pinfo = inet6_sk(ssk);
+
 			if (!ipv6_addr_equal(&local->addr6, &pinfo->saddr) ||
 			    !ipv6_addr_equal(&remote->addr6, &ssk->sk_v6_daddr))
 				continue;
 			break;
+		}
 #endif
 		default:
 			continue;
-- 
2.34.1


Re: Squash to "mptcp: netlink: allow userspace-driven subflow establishment": Tests Results
Posted by MPTCP CI 2 years ago
Hi Matthieu,

Thank you for your modifications, that's great!

Our CI did some validations and here is its report:

- KVM Validation: normal:
  - Success! ✅:
  - Task: https://cirrus-ci.com/task/6623082751197184
  - Summary: https://api.cirrus-ci.com/v1/artifact/task/6623082751197184/summary/summary.txt

- KVM Validation: debug:
  - Unstable: 2 failed test(s): selftest_diag selftest_simult_flows - Critical: KMemLeak ❌:
  - Task: https://cirrus-ci.com/task/6151526950371328
  - Summary: https://api.cirrus-ci.com/v1/artifact/task/6151526950371328/summary/summary.txt

Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/4cf51d33826d


If there are some issues, you can reproduce them using the same environment as
the one used by the CI thanks to a docker image, e.g.:

    $ cd [kernel source code]
    $ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
        --pull always mptcp/mptcp-upstream-virtme-docker:latest \
        auto-debug

For more details:

    https://github.com/multipath-tcp/mptcp-upstream-virtme-docker


Please note that despite all the efforts that have been already done to have a
stable tests suite when executed on a public CI like here, it is possible some
reported issues are not due to your modifications. Still, do not hesitate to
help us improve that ;-)

Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (Tessares)