linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Bob Pearson <rpearsonhpe@gmail.com>
Cc: <zyjzyj2000@gmail.com>, <linux-rdma@vger.kernel.org>,
	Bob Pearson <rpearson@hpe.com>
Subject: Re: [PATCH 4/4] rdma_rxe: remove duplicate entries in struct rxe_mr
Date: Thu, 8 Oct 2020 20:16:42 -0300	[thread overview]
Message-ID: <20201008231642.GA417448@nvidia.com> (raw)
In-Reply-To: <20201008212818.265303-1-rpearson@hpe.com>

On Thu, Oct 08, 2020 at 04:28:18PM -0500, Bob Pearson wrote:

Subject should be of the form

RDMA/rxe: Some subject

RDMA convention is to capitalize the first letter ie 'Some'

> - Struct rxe_mem had pd, lkey and rkey values both in itself
>     and in the struct ib_mr which is also included in rxe_mem.
>   - Delete these entries and replace references with ones in ibmr.
>   - Add mr_lkey and mr_rkey macros which extract these values from mr.
>   - Added mr_pd macro which extracts pd from mr.

Commit body text should be paragraphs not point form

> @@ -333,6 +329,10 @@ struct rxe_mc_grp {
>  	u16			pkey;
>  };
>  
> +#define mr_pd(mr) to_rpd((mr)->ibmr.pd)
> +#define mr_lkey(mr) ((mr)->ibmr.lkey)
> +#define mr_rkey(mr) ((mr)->ibmr.rkey)

Try to avoid macros for implementing functions, I changed this to:

+static inline struct rxe_pd *mr_pd(struct rxe_mem *mr)
+{
+       return to_rpd(mr->ibmr.pd);
+}
+
+static inline u32 mr_lkey(struct rxe_mem *mr)
+{
+       return mr->ibmr.lkey;
+}
+
+static inline u32 mr_rkey(struct rxe_mem *mr)
+{
+       return mr->ibmr.rkey;
+}
+

and fixed the other stuff, applied to for-next

Thanks,
Jason

  reply	other threads:[~2020-10-08 23:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-08 21:28 [PATCH 4/4] rdma_rxe: remove duplicate entries in struct rxe_mr Bob Pearson
2020-10-08 23:16 ` Jason Gunthorpe [this message]
2020-10-09 17:02   ` Bob Pearson
2020-10-09 17:04     ` Jason Gunthorpe

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=20201008231642.GA417448@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=rpearson@hpe.com \
    --cc=rpearsonhpe@gmail.com \
    --cc=zyjzyj2000@gmail.com \
    /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).