Commit ac920d04 authored by Chuck Lever's avatar Chuck Lever Committed by Anna Schumaker

xprtrdma: Simplify synopsis of rpcrdma_buffer_create()

Clean up: There is one call site for rpcrdma_buffer_create(). All of
the arguments there are fields of an rpcrdma_xprt.
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Reviewed-by: default avatarSteve Wise <swise@opengridcomputing.com>
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
parent ce1ab9ab
...@@ -364,8 +364,7 @@ xprt_setup_rdma(struct xprt_create *args) ...@@ -364,8 +364,7 @@ xprt_setup_rdma(struct xprt_create *args)
* any inline data. Also specify any padding which will be provided * any inline data. Also specify any padding which will be provided
* from a preregistered zero buffer. * from a preregistered zero buffer.
*/ */
rc = rpcrdma_buffer_create(&new_xprt->rx_buf, new_ep, &new_xprt->rx_ia, rc = rpcrdma_buffer_create(new_xprt);
&new_xprt->rx_data);
if (rc) if (rc)
goto out3; goto out3;
......
...@@ -1161,9 +1161,11 @@ rpcrdma_init_frmrs(struct rpcrdma_ia *ia, struct rpcrdma_buffer *buf) ...@@ -1161,9 +1161,11 @@ rpcrdma_init_frmrs(struct rpcrdma_ia *ia, struct rpcrdma_buffer *buf)
} }
int int
rpcrdma_buffer_create(struct rpcrdma_buffer *buf, struct rpcrdma_ep *ep, rpcrdma_buffer_create(struct rpcrdma_xprt *r_xprt)
struct rpcrdma_ia *ia, struct rpcrdma_create_data_internal *cdata)
{ {
struct rpcrdma_buffer *buf = &r_xprt->rx_buf;
struct rpcrdma_ia *ia = &r_xprt->rx_ia;
struct rpcrdma_create_data_internal *cdata = &r_xprt->rx_data;
char *p; char *p;
size_t len, rlen, wlen; size_t len, rlen, wlen;
int i, rc; int i, rc;
...@@ -1200,6 +1202,7 @@ rpcrdma_buffer_create(struct rpcrdma_buffer *buf, struct rpcrdma_ep *ep, ...@@ -1200,6 +1202,7 @@ rpcrdma_buffer_create(struct rpcrdma_buffer *buf, struct rpcrdma_ep *ep,
* Register the zeroed pad buffer, if any. * Register the zeroed pad buffer, if any.
*/ */
if (cdata->padding) { if (cdata->padding) {
struct rpcrdma_ep *ep = &r_xprt->rx_ep;
rc = rpcrdma_register_internal(ia, p, cdata->padding, rc = rpcrdma_register_internal(ia, p, cdata->padding,
&ep->rep_pad_mr, &ep->rep_pad); &ep->rep_pad_mr, &ep->rep_pad);
if (rc) if (rc)
......
...@@ -354,9 +354,7 @@ int rpcrdma_ep_post_recv(struct rpcrdma_ia *, struct rpcrdma_ep *, ...@@ -354,9 +354,7 @@ int rpcrdma_ep_post_recv(struct rpcrdma_ia *, struct rpcrdma_ep *,
/* /*
* Buffer calls - xprtrdma/verbs.c * Buffer calls - xprtrdma/verbs.c
*/ */
int rpcrdma_buffer_create(struct rpcrdma_buffer *, struct rpcrdma_ep *, int rpcrdma_buffer_create(struct rpcrdma_xprt *);
struct rpcrdma_ia *,
struct rpcrdma_create_data_internal *);
void rpcrdma_buffer_destroy(struct rpcrdma_buffer *); void rpcrdma_buffer_destroy(struct rpcrdma_buffer *);
struct rpcrdma_req *rpcrdma_buffer_get(struct rpcrdma_buffer *); struct rpcrdma_req *rpcrdma_buffer_get(struct rpcrdma_buffer *);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment