All of lore.kernel.org
 help / color / mirror / Atom feed
* [MPTCP][PATCH mptcp-next] Squash to "mptcp: remote addresses fullmesh"
@ 2021-07-28  9:16 Geliang Tang
  2021-07-28  9:16 ` [MPTCP][PATCH mptcp-next] Squash to "mptcp: local " Geliang Tang
  2021-07-29  0:20 ` [MPTCP][PATCH mptcp-next] Squash to "mptcp: remote " Mat Martineau
  0 siblings, 2 replies; 4+ messages in thread
From: Geliang Tang @ 2021-07-28  9:16 UTC (permalink / raw)
  To: mptcp, geliangtang; +Cc: Geliang Tang

From: Geliang Tang <geliangtang@xiaomi.com>

Fix the checkpatch.pl warning:
 WARNING: networking block comments don't use an empty /* line, use /* Comment...
 #63: FILE: net/mptcp/pm_netlink.c:427:
 +/*
 + * Fill all the remote addresses into the array addrs[],

And some more cleanups.

Signed-off-by: Geliang Tang <geliangtang@xiaomi.com>
---
 net/mptcp/pm_netlink.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
index ecf43d45711a..8eeae401c83f 100644
--- a/net/mptcp/pm_netlink.c
+++ b/net/mptcp/pm_netlink.c
@@ -423,8 +423,7 @@ static bool lookup_address_in_vec(struct mptcp_addr_info *addrs, unsigned int nr
 	return false;
 }
 
-/*
- * Fill all the remote addresses into the array addrs[],
+/* Fill all the remote addresses into the array addrs[],
  * and return the array size.
  */
 static unsigned int fill_remote_addresses_vec(struct mptcp_sock *msk, bool fullmesh,
@@ -440,7 +439,9 @@ static unsigned int fill_remote_addresses_vec(struct mptcp_sock *msk, bool fullm
 	pernet = net_generic(sock_net(sk), pm_nl_pernet_id);
 	subflows_max = mptcp_pm_get_subflows_max(msk);
 
-	/* non-fullmesh, fill in the remote address */
+	/* Non-fullmesh endpoint, fill in the single entry
+	 * corresponding to the primary MPC subflow remote address
+	 */
 	if (!fullmesh) {
 		remote_address((struct sock_common *)sk, &remote);
 		msk->pm.subflows++;
@@ -505,14 +506,13 @@ static void mptcp_pm_create_subflow_or_signal_addr(struct mptcp_sock *msk)
 	    !READ_ONCE(msk->pm.remote_deny_join_id0)) {
 		local = select_local_address(pernet, msk);
 		if (local) {
+			bool fullmesh = !!(local->flags & MPTCP_PM_ADDR_FLAG_FULLMESH);
 			struct mptcp_addr_info addrs[MPTCP_PM_ADDR_MAX];
 			int i, nr;
 
 			msk->pm.local_addr_used++;
 			check_work_pending(msk);
-			nr = fill_remote_addresses_vec(msk,
-						       local->flags & MPTCP_PM_ADDR_FLAG_FULLMESH,
-						       addrs);
+			nr = fill_remote_addresses_vec(msk, fullmesh, addrs);
 			spin_unlock_bh(&msk->pm.lock);
 			for (i = 0; i < nr; i++) {
 				__mptcp_subflow_connect(sk, &local->addr, &addrs[i],
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-07-29  0:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-28  9:16 [MPTCP][PATCH mptcp-next] Squash to "mptcp: remote addresses fullmesh" Geliang Tang
2021-07-28  9:16 ` [MPTCP][PATCH mptcp-next] Squash to "mptcp: local " Geliang Tang
2021-07-29  0:21   ` Mat Martineau
2021-07-29  0:20 ` [MPTCP][PATCH mptcp-next] Squash to "mptcp: remote " Mat Martineau

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.