From: Christoph Hellwig <hch@infradead.org>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: bfields@fieldses.org, linux-rdma@vger.kernel.org,
linux-nfs@vger.kernel.org
Subject: Re: [PATCH v2 4/7] svcrdma: Clean up backchannel send header encoding
Date: Wed, 1 Feb 2017 10:29:57 -0800 [thread overview]
Message-ID: <20170201182957.GC32532@infradead.org> (raw)
In-Reply-To: <20170131185318.14185.90053.stgit@klimt.1015granger.net>
On Tue, Jan 31, 2017 at 01:53:18PM -0500, Chuck Lever wrote:
> Replace C structure-based XDR decoding with pointer arithmetic.
> Pointer arithmetic is considered more portable.
>
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> ---
> net/sunrpc/xprtrdma/svc_rdma_backchannel.c | 17 +++++++++--------
> 1 file changed, 9 insertions(+), 8 deletions(-)
>
> diff --git a/net/sunrpc/xprtrdma/svc_rdma_backchannel.c b/net/sunrpc/xprtrdma/svc_rdma_backchannel.c
> index 288e35c..abfce04 100644
> --- a/net/sunrpc/xprtrdma/svc_rdma_backchannel.c
> +++ b/net/sunrpc/xprtrdma/svc_rdma_backchannel.c
> @@ -200,19 +200,20 @@ static int svc_rdma_bc_sendto(struct svcxprt_rdma *rdma,
> {
> struct rpc_xprt *xprt = rqst->rq_xprt;
> struct rpcrdma_xprt *r_xprt = rpcx_to_rdmax(xprt);
> - struct rpcrdma_msg *headerp = (struct rpcrdma_msg *)rqst->rq_buffer;
> + __be32 *p;
> int rc;
>
> /* Space in the send buffer for an RPC/RDMA header is reserved
> * via xprt->tsh_size.
> */
> + p = (__be32 *)rqst->rq_buffer;
Why not move the assignment onto the same line as the declaration
of p? Also rq_buffer is a void pointer, so the case shouldn't be
needed.
Otherwise looks fine:
Reviewed-by: Christoph Hellwig <hch@lst.de>
next prev parent reply other threads:[~2017-02-01 18:29 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-31 18:52 [PATCH v2 0/7] Server-side NFS/RDMA changes for v4.11 Chuck Lever
2017-01-31 18:52 ` [PATCH v2 1/7] svcrdma: Another sendto chunk list parsing update Chuck Lever
2017-01-31 18:53 ` [PATCH v2 2/7] svcrdma: Clean up RPC-over-RDMA Reply header encoder Chuck Lever
2017-02-01 18:25 ` Christoph Hellwig
2017-02-01 19:39 ` Chuck Lever
2017-01-31 18:53 ` [PATCH v2 3/7] svcrdma: Clean up RPC-over-RDMA Call header decoder Chuck Lever
2017-02-01 18:28 ` Christoph Hellwig
2017-01-31 18:53 ` [PATCH v2 4/7] svcrdma: Clean up backchannel send header encoding Chuck Lever
2017-02-01 18:29 ` Christoph Hellwig [this message]
2017-02-01 19:48 ` Chuck Lever
2017-01-31 18:53 ` [PATCH v2 5/7] svcrdma: Remove unused sc_dto_q field Chuck Lever
2017-02-01 18:30 ` Christoph Hellwig
2017-01-31 18:53 ` [PATCH v2 6/7] svcrdma: Combine list fields in struct svc_rdma_op_ctxt Chuck Lever
2017-02-01 18:30 ` Christoph Hellwig
2017-01-31 18:53 ` [PATCH v2 7/7] svcrdma: Poll CQs in "workqueue" mode Chuck Lever
2017-02-01 18:31 ` Christoph Hellwig
2017-02-06 22:39 ` [PATCH v2 0/7] Server-side NFS/RDMA changes for v4.11 J. Bruce Fields
2017-02-06 22:48 ` Chuck Lever
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=20170201182957.GC32532@infradead.org \
--to=hch@infradead.org \
--cc=bfields@fieldses.org \
--cc=chuck.lever@oracle.com \
--cc=linux-nfs@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
/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).