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 05/24] lustre: ptlrpc: change rq_source to struct lnet_nid
Date: Sun, 18 Sep 2022 01:21:55 -0400 [thread overview]
Message-ID: <1663478534-19917-6-git-send-email-jsimmons@infradead.org> (raw)
In-Reply-To: <1663478534-19917-1-git-send-email-jsimmons@infradead.org>
From: Mr NeilBrown <neilb@suse.de>
rq_source in struct ptlrpc_request can now store large NIDs.
ptl_send_buf() now takes a struct lnet_processid for the peer.
WC-bug-id: https://jira.whamcloud.com/browse/LU-10391
Lustre-commit: 1c250cbfa127a1517 ("LU-10391 ptlrpc: change rq_source to struct lnet_nid")
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Reviewed-on: https://review.whamcloud.com/44639
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
fs/lustre/include/lustre_net.h | 2 +-
fs/lustre/ptlrpc/events.c | 4 ++--
fs/lustre/ptlrpc/niobuf.c | 14 ++++++--------
3 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/fs/lustre/include/lustre_net.h b/fs/lustre/include/lustre_net.h
index da90d4f..d9aa530 100644
--- a/fs/lustre/include/lustre_net.h
+++ b/fs/lustre/include/lustre_net.h
@@ -945,7 +945,7 @@ struct ptlrpc_request {
/** Peer description (the other side) */
struct lnet_processid rq_peer;
/** Descriptor for the NID from which the peer sent the request. */
- struct lnet_process_id rq_source;
+ struct lnet_processid rq_source;
/**
* service time estimate (secs)
* If the request is not served by this time, it is marked as timed out.
diff --git a/fs/lustre/ptlrpc/events.c b/fs/lustre/ptlrpc/events.c
index 6b6fd97..e6313af 100644
--- a/fs/lustre/ptlrpc/events.c
+++ b/fs/lustre/ptlrpc/events.c
@@ -347,7 +347,7 @@ void request_in_callback(struct lnet_event *ev)
ktime_get_real_ts64(&req->rq_arrival_time);
/* Multi-Rail: keep track of both initiator and source NID. */
req->rq_peer = ev->initiator;
- req->rq_source = lnet_pid_to_pid4(&ev->source);
+ req->rq_source = ev->source;
req->rq_self = ev->target.nid;
req->rq_rqbd = rqbd;
req->rq_phase = RQ_PHASE_NEW;
@@ -356,7 +356,7 @@ void request_in_callback(struct lnet_event *ev)
req, req->rq_xid, ev->mlength);
CDEBUG(D_RPCTRACE, "peer: %s (source: %s)\n",
- libcfs_idstr(&req->rq_peer), libcfs_id2str(req->rq_source));
+ libcfs_idstr(&req->rq_peer), libcfs_idstr(&req->rq_source));
spin_lock(&svcpt->scp_lock);
diff --git a/fs/lustre/ptlrpc/niobuf.c b/fs/lustre/ptlrpc/niobuf.c
index 099f105..8f19e92 100644
--- a/fs/lustre/ptlrpc/niobuf.c
+++ b/fs/lustre/ptlrpc/niobuf.c
@@ -46,20 +46,18 @@
*/
static int ptl_send_buf(struct lnet_handle_md *mdh, void *base, int len,
enum lnet_ack_req ack, struct ptlrpc_cb_id *cbid,
- lnet_nid_t self4, struct lnet_process_id peer_id4,
+ lnet_nid_t self4, struct lnet_processid *peer_id,
int portal, u64 xid, unsigned int offset,
struct lnet_handle_md *bulk_cookie)
{
int rc;
struct lnet_md md;
struct lnet_nid self;
- struct lnet_processid peer_id;
lnet_nid4_to_nid(self4, &self);
- lnet_pid4_to_pid(peer_id4, &peer_id);
LASSERT(portal != 0);
- CDEBUG(D_INFO, "peer_id %s\n", libcfs_id2str(peer_id4));
+ CDEBUG(D_INFO, "peer_id %s\n", libcfs_idstr(peer_id));
md.start = base;
md.length = len;
md.threshold = (ack == LNET_ACK_REQ) ? 2 : 1;
@@ -91,7 +89,7 @@ static int ptl_send_buf(struct lnet_handle_md *mdh, void *base, int len,
percpu_ref_get(&ptlrpc_pending);
rc = LNetPut(&self, *mdh, ack,
- &peer_id, portal, xid, offset, 0);
+ peer_id, portal, xid, offset, 0);
if (unlikely(rc != 0)) {
int rc2;
/* We're going to get an UNLINK event when I unlink below,
@@ -99,7 +97,7 @@ static int ptl_send_buf(struct lnet_handle_md *mdh, void *base, int len,
* I fall through and return success here!
*/
CERROR("LNetPut(%s, %d, %lld) failed: %d\n",
- libcfs_id2str(peer_id4), portal, xid, rc);
+ libcfs_idstr(peer_id), portal, xid, rc);
rc2 = LNetMDUnlink(*mdh);
LASSERTF(rc2 == 0, "rc2 = %d\n", rc2);
}
@@ -437,7 +435,7 @@ int ptlrpc_send_reply(struct ptlrpc_request *req, int flags)
(rs->rs_difficult && !rs->rs_no_ack) ?
LNET_ACK_REQ : LNET_NOACK_REQ,
&rs->rs_cb_id, lnet_nid_to_nid4(&req->rq_self),
- req->rq_source,
+ &req->rq_source,
ptlrpc_req2svc(req)->srv_rep_portal,
req->rq_rep_mbits ? req->rq_rep_mbits : req->rq_xid,
req->rq_reply_off, NULL);
@@ -729,7 +727,7 @@ int ptl_send_rpc(struct ptlrpc_request *request, int noreply)
request->rq_reqbuf, request->rq_reqdata_len,
LNET_NOACK_REQ, &request->rq_req_cbid,
LNET_NID_ANY,
- lnet_pid_to_pid4(&connection->c_peer),
+ &connection->c_peer,
request->rq_request_portal,
request->rq_xid, 0, &bulk_cookie);
if (likely(rc == 0))
--
1.8.3.1
_______________________________________________
lustre-devel mailing list
lustre-devel@lists.lustre.org
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org
next prev parent reply other threads:[~2022-09-18 5:22 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-18 5:21 [lustre-devel] [PATCH 00/24] lustre: update to 2.15.52 James Simmons
2022-09-18 5:21 ` [lustre-devel] [PATCH 01/24] lustre: dne: add crush2 hash type James Simmons
2022-09-18 5:21 ` [lustre-devel] [PATCH 02/24] lustre: ptlrpc: change rq_self to struct lnet_nid James Simmons
2022-09-18 5:21 ` [lustre-devel] [PATCH 03/24] lustre: ptlrpc: pass net num to ptlrpc_uuid_to_connection James Simmons
2022-09-18 5:21 ` [lustre-devel] [PATCH 04/24] lustre: ptlrpc: change rq_peer to struct lnet_nid James Simmons
2022-09-18 5:21 ` James Simmons [this message]
2022-09-18 5:21 ` [lustre-devel] [PATCH 06/24] lustre: ptlrpc: change bd_sender in ptlrpc_bulk_frag_ops James Simmons
2022-09-18 5:21 ` [lustre-devel] [PATCH 07/24] lustre: ptlrpc: pass lnet_nid for self to ptl_send_buf() James Simmons
2022-09-18 5:21 ` [lustre-devel] [PATCH 08/24] lustre: llite: don't use a kms if it invalid James Simmons
2022-09-18 5:21 ` [lustre-devel] [PATCH 09/24] lustre: mdc: check/grab import before access James Simmons
2022-09-18 5:22 ` [lustre-devel] [PATCH 10/24] lustre: llog: handle -EBADR for catalog processing James Simmons
2022-09-18 5:22 ` [lustre-devel] [PATCH 11/24] lnet: Always use ping reply to set route lr_alive James Simmons
2022-09-18 5:22 ` [lustre-devel] [PATCH 12/24] lustre: clio: remove vvp_page_print() James Simmons
2022-09-18 5:22 ` [lustre-devel] [PATCH 13/24] lustre: clio: remove cpo_prep and cpo_make_ready James Simmons
2022-09-18 5:22 ` [lustre-devel] [PATCH 14/24] lustre: clio: remove struct vvp_page James Simmons
2022-09-18 5:22 ` [lustre-devel] [PATCH 15/24] lustre: clio: remove unused convenience functions James Simmons
2022-09-18 5:22 ` [lustre-devel] [PATCH 16/24] lustre: clio: remove cpl_obj James Simmons
2022-09-18 5:22 ` [lustre-devel] [PATCH 17/24] lustre: osc: remove oap_cli James Simmons
2022-09-18 5:22 ` [lustre-devel] [PATCH 18/24] lustre: osc: Remove submit time James Simmons
2022-09-18 5:22 ` [lustre-devel] [PATCH 19/24] lnet: selftest: revert "LU-16011 lnet: use preallocate bulk for server" James Simmons
2022-09-18 5:22 ` [lustre-devel] [PATCH 20/24] lustre: flr: allow layout version update from client/MDS James Simmons
2022-09-18 5:22 ` [lustre-devel] [PATCH 21/24] lustre: ptlrpc: adds configurable ping interval James Simmons
2022-09-18 5:22 ` [lustre-devel] [PATCH 22/24] lnet: allow direct messages regardless of peer NI status James Simmons
2022-09-18 5:22 ` [lustre-devel] [PATCH 23/24] lnet: Honor peer timeout of zero James Simmons
2022-09-18 5:22 ` [lustre-devel] [PATCH 24/24] lustre: update version to 2.15.52 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=1663478534-19917-6-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).