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: Fri, 9 Oct 2020 14:04:07 -0300 [thread overview]
Message-ID: <20201009170407.GO4734@nvidia.com> (raw)
In-Reply-To: <60104d8d-04b7-d4cf-5aa3-7d2ff5d424cf@gmail.com>
On Fri, Oct 09, 2020 at 12:02:24PM -0500, Bob Pearson wrote:
> On 10/8/20 6:16 PM, Jason Gunthorpe wrote:
> > 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
> >
> Thanks for the style hints and applying the patch. Just guessing but
> I assume that in RDMA/somthing RDMA refers to the entire
> drivers/infiniband tree. The equivalent for user space is RDMA-CORE
> or rdma-core ??
Userspace is usualy something like providers/rxe:
Jason
prev parent reply other threads:[~2020-10-09 17:04 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
2020-10-09 17:02 ` Bob Pearson
2020-10-09 17:04 ` Jason Gunthorpe [this message]
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=20201009170407.GO4734@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).