rpcrdma: Remove C structure definitions of XDR data items
authorChuck Lever <chuck.lever@oracle.com>
Mon, 30 Oct 2017 20:21:57 +0000 (16:21 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Fri, 17 Nov 2017 21:43:42 +0000 (16:43 -0500)
Clean up: C-structure style XDR encoding and decoding logic has
been replaced over the past several merge windows on both the
client and server. These data structures are no longer used.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Devesh Sharma <devesh.sharma@broadcom.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
include/linux/sunrpc/rpc_rdma.h
net/sunrpc/xprtrdma/rpc_rdma.c
net/sunrpc/xprtrdma/xprt_rdma.h

index b7e85b341a54f5498e8a2095f3aef84cf5a0fe63..840afac162725a5f9c20f852d3f21c09d0d4c6e3 100644 (file)
@@ -50,65 +50,6 @@ enum {
        RPCRDMA_V1_DEF_INLINE_SIZE      = 1024,
 };
 
-struct rpcrdma_segment {
-       __be32 rs_handle;       /* Registered memory handle */
-       __be32 rs_length;       /* Length of the chunk in bytes */
-       __be64 rs_offset;       /* Chunk virtual address or offset */
-};
-
-/*
- * read chunk(s), encoded as a linked list.
- */
-struct rpcrdma_read_chunk {
-       __be32 rc_discrim;      /* 1 indicates presence */
-       __be32 rc_position;     /* Position in XDR stream */
-       struct rpcrdma_segment rc_target;
-};
-
-/*
- * write chunk, and reply chunk.
- */
-struct rpcrdma_write_chunk {
-       struct rpcrdma_segment wc_target;
-};
-
-/*
- * write chunk(s), encoded as a counted array.
- */
-struct rpcrdma_write_array {
-       __be32 wc_discrim;      /* 1 indicates presence */
-       __be32 wc_nchunks;      /* Array count */
-       struct rpcrdma_write_chunk wc_array[0];
-};
-
-struct rpcrdma_msg {
-       __be32 rm_xid;  /* Mirrors the RPC header xid */
-       __be32 rm_vers; /* Version of this protocol */
-       __be32 rm_credit;       /* Buffers requested/granted */
-       __be32 rm_type; /* Type of message (enum rpcrdma_proc) */
-       union {
-
-               struct {                        /* no chunks */
-                       __be32 rm_empty[3];     /* 3 empty chunk lists */
-               } rm_nochunks;
-
-               struct {                        /* no chunks and padded */
-                       __be32 rm_align;        /* Padding alignment */
-                       __be32 rm_thresh;       /* Padding threshold */
-                       __be32 rm_pempty[3];    /* 3 empty chunk lists */
-               } rm_padded;
-
-               struct {
-                       __be32 rm_err;
-                       __be32 rm_vers_low;
-                       __be32 rm_vers_high;
-               } rm_error;
-
-               __be32 rm_chunks[0];    /* read, write and reply chunks */
-
-       } rm_body;
-};
-
 /*
  * XDR sizes, in quads
  */
index 4fdeaac6ebe6a3100fd0d7fcd2bc16183efbdfb8..45cb5497b37f1817eb809b448f9340c9b8ea61b5 100644 (file)
@@ -75,11 +75,11 @@ static unsigned int rpcrdma_max_call_header_size(unsigned int maxsegs)
 
        /* Maximum Read list size */
        maxsegs += 2;   /* segment for head and tail buffers */
-       size = maxsegs * sizeof(struct rpcrdma_read_chunk);
+       size = maxsegs * rpcrdma_readchunk_maxsz * sizeof(__be32);
 
        /* Minimal Read chunk size */
        size += sizeof(__be32); /* segment count */
-       size += sizeof(struct rpcrdma_segment);
+       size += rpcrdma_segment_maxsz * sizeof(__be32);
        size += sizeof(__be32); /* list discriminator */
 
        dprintk("RPC:       %s: max call header size = %u\n",
@@ -102,7 +102,7 @@ static unsigned int rpcrdma_max_reply_header_size(unsigned int maxsegs)
        /* Maximum Write list size */
        maxsegs += 2;   /* segment for head and tail buffers */
        size = sizeof(__be32);          /* segment count */
-       size += maxsegs * sizeof(struct rpcrdma_segment);
+       size += maxsegs * rpcrdma_segment_maxsz * sizeof(__be32);
        size += sizeof(__be32); /* list discriminator */
 
        dprintk("RPC:       %s: max reply header size = %u\n",
index 6e64c8259d34751d32422a254fb5e9957acb5828..8b9954c41ee4dd36bbe0c777d945ac507003791a 100644 (file)
@@ -145,12 +145,6 @@ rdmab_lkey(struct rpcrdma_regbuf *rb)
        return rb->rg_iov.lkey;
 }
 
-static inline struct rpcrdma_msg *
-rdmab_to_msg(struct rpcrdma_regbuf *rb)
-{
-       return (struct rpcrdma_msg *)rb->rg_base;
-}
-
 static inline struct ib_device *
 rdmab_device(struct rpcrdma_regbuf *rb)
 {