From: Mat Martineau <mathew.j.martineau@linux.intel.com>
To: netdev@vger.kernel.org
Cc: Geliang Tang <geliangtang@gmail.com>,
davem@davemloft.net, kuba@kernel.org,
matthieu.baerts@tessares.net, mptcp@lists.linux.dev,
Mat Martineau <mathew.j.martineau@linux.intel.com>
Subject: [PATCH net-next 1/6] mptcp: remove all subflows involving id 0 address
Date: Tue, 30 Mar 2021 17:08:51 -0700 [thread overview]
Message-ID: <20210331000856.117636-2-mathew.j.martineau@linux.intel.com> (raw)
In-Reply-To: <20210331000856.117636-1-mathew.j.martineau@linux.intel.com>
From: Geliang Tang <geliangtang@gmail.com>
There's only one subflow involving the non-zero id address, but there
may be multi subflows involving the id 0 address.
Here's an example:
local_id=0, remote_id=0
local_id=1, remote_id=0
local_id=0, remote_id=1
If the removing address id is 0, all the subflows involving the id 0
address need to be removed.
In mptcp_pm_nl_rm_addr_received/mptcp_pm_nl_rm_subflow_received, the
"break" prevents the iteration to the next subflow, so this patch
dropped them.
Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
---
net/mptcp/pm_netlink.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
index 73b9245c87b2..87a6133fd778 100644
--- a/net/mptcp/pm_netlink.c
+++ b/net/mptcp/pm_netlink.c
@@ -621,8 +621,6 @@ static void mptcp_pm_nl_rm_addr_received(struct mptcp_sock *msk)
WRITE_ONCE(msk->pm.accept_addr, true);
__MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_RMADDR);
-
- break;
}
}
}
@@ -695,8 +693,6 @@ void mptcp_pm_nl_rm_subflow_received(struct mptcp_sock *msk,
msk->pm.subflows--;
__MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_RMSUBFLOW);
-
- break;
}
}
}
--
2.31.1
next prev parent reply other threads:[~2021-03-31 0:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-31 0:08 [PATCH net-next 0/6] MPTCP: Allow initial subflow to be disconnected Mat Martineau
2021-03-31 0:08 ` Mat Martineau [this message]
2021-03-31 0:08 ` [PATCH net-next 2/6] mptcp: unify RM_ADDR and RM_SUBFLOW receiving Mat Martineau
2021-03-31 0:08 ` [PATCH net-next 3/6] mptcp: remove id 0 address Mat Martineau
2021-03-31 0:08 ` [PATCH net-next 4/6] selftests: mptcp: avoid calling pm_nl_ctl with bad IDs Mat Martineau
2021-03-31 0:08 ` [PATCH net-next 5/6] selftests: mptcp: add addr argument for del_addr Mat Martineau
2021-03-31 0:08 ` [PATCH net-next 6/6] selftests: mptcp: remove id 0 address testcases Mat Martineau
2021-03-31 0:50 ` [PATCH net-next 0/6] MPTCP: Allow initial subflow to be disconnected patchwork-bot+netdevbpf
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=20210331000856.117636-2-mathew.j.martineau@linux.intel.com \
--to=mathew.j.martineau@linux.intel.com \
--cc=davem@davemloft.net \
--cc=geliangtang@gmail.com \
--cc=kuba@kernel.org \
--cc=matthieu.baerts@tessares.net \
--cc=mptcp@lists.linux.dev \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).