lustre-devel-lustre.org archive mirror
 help / color / mirror / Atom feed
From: James Simmons <jsimmons@infradead.org>
To: Andreas Dilger <adilger@whamcloud.com>,
	Oleg Drokin <green@whamcloud.com>, NeilBrown <neilb@suse.de>
Cc: Lustre Development List <lustre-devel@lists.lustre.org>
Subject: [lustre-devel] [PATCH 16/20] lnet: socklnd: remove remnants of tcp bonding
Date: Fri, 14 Oct 2022 17:38:07 -0400	[thread overview]
Message-ID: <1665783491-13827-17-git-send-email-jsimmons@infradead.org> (raw)
In-Reply-To: <1665783491-13827-1-git-send-email-jsimmons@infradead.org>

From: Mr NeilBrown <neilb@suse.de>

->ksnp_n_passive_ips is now always zero, so remove it and all uses of
it.  ->ksnp_passive_ips is gone too, as is ksocknal_ip2iface().

WC-bug-id: https://jira.whamcloud.com/browse/LU-13641
Lustre-commit: 3630e1eaf9db562a1 ("LU-13641 socklnd: remove remnants of tcp bonding")
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48568
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 net/lnet/klnds/socklnd/socklnd.c | 73 +++-----------------------------
 net/lnet/klnds/socklnd/socklnd.h |  4 --
 2 files changed, 6 insertions(+), 71 deletions(-)

diff --git a/net/lnet/klnds/socklnd/socklnd.c b/net/lnet/klnds/socklnd/socklnd.c
index 8999580b67b4..9c8b75f0b2a2 100644
--- a/net/lnet/klnds/socklnd/socklnd.c
+++ b/net/lnet/klnds/socklnd/socklnd.c
@@ -46,20 +46,6 @@
 static struct lnet_lnd the_ksocklnd;
 struct ksock_nal_data ksocknal_data;
 
-static struct ksock_interface *
-ksocknal_ip2iface(struct lnet_ni *ni, struct sockaddr *addr)
-{
-	struct ksock_net *net = ni->ni_data;
-	struct ksock_interface *iface;
-
-	iface = &net->ksnn_interface;
-
-	if (rpc_cmp_addr((struct sockaddr *)&iface->ksni_addr, addr))
-		return iface;
-
-	return NULL;
-}
-
 static struct ksock_interface *
 ksocknal_index2iface(struct lnet_ni *ni, int index)
 {
@@ -281,28 +267,6 @@ ksocknal_find_peer(struct lnet_ni *ni, struct lnet_processid *id)
 static void
 ksocknal_unlink_peer_locked(struct ksock_peer_ni *peer_ni)
 {
-	int i;
-	struct ksock_interface *iface;
-
-	for (i = 0; i < peer_ni->ksnp_n_passive_ips; i++) {
-		struct sockaddr_in sa = { .sin_family = AF_INET };
-
-		LASSERT(i < LNET_INTERFACES_NUM);
-		sa.sin_addr.s_addr = htonl(peer_ni->ksnp_passive_ips[i]);
-
-		iface = ksocknal_ip2iface(peer_ni->ksnp_ni,
-					  (struct sockaddr *)&sa);
-		/*
-		 * All IPs in peer_ni->ksnp_passive_ips[] come from the
-		 * interface list, therefore the call must succeed.
-		 */
-		LASSERT(iface);
-
-		CDEBUG(D_NET, "peer_ni=%p iface=%p ksni_nroutes=%d\n",
-		       peer_ni, iface, iface->ksni_nroutes);
-		iface->ksni_npeers--;
-	}
-
 	LASSERT(list_empty(&peer_ni->ksnp_conns));
 	LASSERT(!peer_ni->ksnp_conn_cb);
 	LASSERT(!peer_ni->ksnp_closing);
@@ -320,7 +284,6 @@ ksocknal_get_peer_info(struct lnet_ni *ni, int index,
 	struct ksock_peer_ni *peer_ni;
 	struct ksock_conn_cb *conn_cb;
 	int i;
-	int j;
 	int rc = -ENOENT;
 
 	read_lock(&ksocknal_data.ksnd_global_lock);
@@ -328,12 +291,11 @@ ksocknal_get_peer_info(struct lnet_ni *ni, int index,
 	hash_for_each(ksocknal_data.ksnd_peers, i, peer_ni, ksnp_list) {
 		if (peer_ni->ksnp_ni != ni)
 			continue;
+		if (index-- > 0)
+			continue;
 
-		if (!peer_ni->ksnp_n_passive_ips &&
-		    !peer_ni->ksnp_conn_cb) {
-			if (index-- > 0)
-				continue;
-
+		conn_cb = peer_ni->ksnp_conn_cb;
+		if (!conn_cb) {
 			*id = peer_ni->ksnp_id;
 			*myip = 0;
 			*peer_ip = 0;
@@ -341,29 +303,7 @@ ksocknal_get_peer_info(struct lnet_ni *ni, int index,
 			*conn_count = 0;
 			*share_count = 0;
 			rc = 0;
-			goto out;
-		}
-
-		for (j = 0; j < peer_ni->ksnp_n_passive_ips; j++) {
-			if (index-- > 0)
-				continue;
-
-			*id = peer_ni->ksnp_id;
-			*myip = peer_ni->ksnp_passive_ips[j];
-			*peer_ip = 0;
-			*port = 0;
-			*conn_count = 0;
-			*share_count = 0;
-			rc = 0;
-			goto out;
-		}
-
-		if (peer_ni->ksnp_conn_cb) {
-			if (index-- > 0)
-				continue;
-
-			conn_cb = peer_ni->ksnp_conn_cb;
-
+		} else {
 			*id = peer_ni->ksnp_id;
 			if (conn_cb->ksnr_addr.ss_family == AF_INET) {
 				struct sockaddr_in *sa;
@@ -383,10 +323,9 @@ ksocknal_get_peer_info(struct lnet_ni *ni, int index,
 			}
 			*conn_count = conn_cb->ksnr_conn_count;
 			*share_count = 1;
-			goto out;
 		}
+		break;
 	}
-out:
 	read_unlock(&ksocknal_data.ksnd_global_lock);
 	return rc;
 }
diff --git a/net/lnet/klnds/socklnd/socklnd.h b/net/lnet/klnds/socklnd/socklnd.h
index 93368bd4139f..dcb4b2952f8e 100644
--- a/net/lnet/klnds/socklnd/socklnd.h
+++ b/net/lnet/klnds/socklnd/socklnd.h
@@ -438,10 +438,6 @@ struct ksock_peer_ni {
 							 */
 	time64_t		ksnp_send_keepalive;	/* time to send keepalive */
 	struct lnet_ni	       *ksnp_ni;		/* which network */
-	int			ksnp_n_passive_ips;	/* # of... */
-
-	/* preferred local interfaces */
-	u32			ksnp_passive_ips[LNET_INTERFACES_NUM];
 };
 
 struct ksock_connreq {
-- 
2.27.0

_______________________________________________
lustre-devel mailing list
lustre-devel@lists.lustre.org
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org

  parent reply	other threads:[~2022-10-14 21:38 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-14 21:37 [lustre-devel] [PATCH 00/20] lustre: backport OpenSFS work as of Oct 14, 2022 James Simmons
2022-10-14 21:37 ` [lustre-devel] [PATCH 01/20] lustre: ptlrpc: protect rq_repmsg in ptlrpc_req_drop_rs() James Simmons
2022-10-14 21:37 ` [lustre-devel] [PATCH 02/20] lustre: obdclass: set OBD_MD_FLGROUP for ladvise RPC James Simmons
2022-10-14 21:37 ` [lustre-devel] [PATCH 03/20] lustre: obdclass: free inst_name correctly James Simmons
2022-10-14 21:37 ` [lustre-devel] [PATCH 04/20] lustre: osc: take ldlm lock when queue sync pages James Simmons
2022-10-14 21:37 ` [lustre-devel] [PATCH 05/20] lnet: track pinginfo size in bytes, not nis James Simmons
2022-10-14 21:37 ` [lustre-devel] [PATCH 06/20] lnet: add iface index to struct lnet_inetdev James Simmons
2022-10-14 21:37 ` [lustre-devel] [PATCH 07/20] lnet: ksocklnd: support IPv6 in ksocknal_ip2index() James Simmons
2022-10-14 21:37 ` [lustre-devel] [PATCH 08/20] lnet: only use PUBLIC IP6 addresses for connections James Simmons
2022-10-14 21:38 ` [lustre-devel] [PATCH 09/20] lustre: osc: Remove oap_magic James Simmons
2022-10-14 21:38 ` [lustre-devel] [PATCH 10/20] lustre: ptlrpc: add assert for ptlrpc_service_purge_all James Simmons
2022-10-14 21:38 ` [lustre-devel] [PATCH 11/20] lustre: ptlrpc: lower the message level in no resend case James Simmons
2022-10-14 21:38 ` [lustre-devel] [PATCH 12/20] lustre: obdclass: user netlink to collect devices information James Simmons
2022-10-14 21:38 ` [lustre-devel] [PATCH 13/20] lnet: use %pISc for formatting IP addresses James Simmons
2022-10-14 21:38 ` [lustre-devel] [PATCH 14/20] lustre: llog: correct llog FID and path output James Simmons
2022-10-14 21:38 ` [lustre-devel] [PATCH 15/20] lnet: o2iblnd: fix handling of RDMA_CM_EVENT_UNREACHABLE James Simmons
2022-10-14 21:38 ` James Simmons [this message]
2022-10-14 21:38 ` [lustre-devel] [PATCH 17/20] lnet: Router test interop check and aarch fix James Simmons
2022-10-14 21:38 ` [lustre-devel] [PATCH 18/20] lnet: o2iblnd: fix deadline for tx on peer queue James Simmons
2022-10-14 21:38 ` [lustre-devel] [PATCH 19/20] lnet: o2iblnd: detect link state to set fatal error on ni James Simmons
2022-10-14 21:38 ` [lustre-devel] [PATCH 20/20] lnet: socklnd: limit retries on conns_per_peer mismatch James Simmons

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=1665783491-13827-17-git-send-email-jsimmons@infradead.org \
    --to=jsimmons@infradead.org \
    --cc=adilger@whamcloud.com \
    --cc=green@whamcloud.com \
    --cc=lustre-devel@lists.lustre.org \
    --cc=neilb@suse.de \
    /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).