svcrdma: Move struct svc_rdma_chunk_ctxt to svc_rdma.h
authorChuck Lever <chuck.lever@oracle.com>
Mon, 4 Dec 2023 14:57:09 +0000 (09:57 -0500)
committerChuck Lever <chuck.lever@oracle.com>
Sun, 7 Jan 2024 22:54:29 +0000 (17:54 -0500)
Prepare for nestling these into the send and recv ctxts so they
no longer have to be allocated dynamically.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
include/linux/sunrpc/svc_rdma.h
net/sunrpc/xprtrdma/svc_rdma_rw.c

index ab25001..50c4f18 100644 (file)
@@ -127,6 +127,21 @@ enum {
 
 #define RPCSVC_MAXPAYLOAD_RDMA RPCSVC_MAXPAYLOAD
 
+/*
+ * A chunk context tracks all I/O for moving one Read or Write
+ * chunk. This is a set of rdma_rw's that handle data movement
+ * for all segments of one chunk.
+ */
+struct svc_rdma_chunk_ctxt {
+       struct rpc_rdma_cid     cc_cid;
+       struct ib_cqe           cc_cqe;
+       struct list_head        cc_rwctxts;
+       ktime_t                 cc_posttime;
+       int                     cc_sqecount;
+       enum ib_wc_status       cc_status;
+       struct completion       cc_done;
+};
+
 struct svc_rdma_recv_ctxt {
        struct llist_node       rc_node;
        struct list_head        rc_list;
index cfa5973..1de56e9 100644 (file)
@@ -146,24 +146,6 @@ static int svc_rdma_rw_ctx_init(struct svcxprt_rdma *rdma,
        return ret;
 }
 
-/* A chunk context tracks all I/O for moving one Read or Write
- * chunk. This is a set of rdma_rw's that handle data movement
- * for all segments of one chunk.
- *
- * These are small, acquired with a single allocator call, and
- * no more than one is needed per chunk. They are allocated on
- * demand, and not cached.
- */
-struct svc_rdma_chunk_ctxt {
-       struct rpc_rdma_cid     cc_cid;
-       struct ib_cqe           cc_cqe;
-       struct list_head        cc_rwctxts;
-       ktime_t                 cc_posttime;
-       int                     cc_sqecount;
-       enum ib_wc_status       cc_status;
-       struct completion       cc_done;
-};
-
 static void svc_rdma_cc_cid_init(struct svcxprt_rdma *rdma,
                                 struct rpc_rdma_cid *cid)
 {