public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: "Margolin, Michael" <mrgolin@amazon.com>
Cc: Leon Romanovsky <leon@kernel.org>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"Jahjah, Firas" <firasj@amazon.com>,
	"Leybovich, Yossi" <sleybo@amazon.com>,
	"Kranzdorf, Daniel" <dkkranzd@amazon.com>
Subject: Re: [PATCH for-next] RDMA/efa: Support CQ receive entries with source GID
Date: Wed, 17 Aug 2022 09:29:43 -0300	[thread overview]
Message-ID: <YvzfN6Ns7iaUmyGa@nvidia.com> (raw)
In-Reply-To: <a096d37b-e636-d621-8065-195d7cba627c@amazon.com>

On Wed, Aug 17, 2022 at 03:18:01PM +0300, Margolin, Michael wrote:
> 
> On 8/16/2022 4:56 PM, Leon Romanovsky wrote:
> > CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.
> >
> >
> >
> > On Tue, Aug 09, 2022 at 06:16:36PM +0300, Michael Margolin wrote:
> >> Add a parameter for create CQ admin command to set source address on
> >> receive completion descriptors. Report capability for this feature
> >> through query device verb.
> >>
> >> Reviewed-by: Firas Jahjah <firasj@amazon.com>
> >> Reviewed-by: Yossi Leybovich <sleybo@amazon.com>
> >> Signed-off-by: Daniel Kranzdorf <dkkranzd@amazon.com>
> >> Signed-off-by: Michael Margolin <mrgolin@amazon.com>
> >> ---
> >>  drivers/infiniband/hw/efa/efa_admin_cmds_defs.h | 6 +++++-
> >>  drivers/infiniband/hw/efa/efa_com_cmd.c         | 5 ++++-
> >>  drivers/infiniband/hw/efa/efa_com_cmd.h         | 1 +
> >>  drivers/infiniband/hw/efa/efa_verbs.c           | 4 +++-
> >>  include/uapi/rdma/efa-abi.h                     | 4 +++-
> >>  5 files changed, 16 insertions(+), 4 deletions(-)
> > <...>
> >
> >> diff --git a/drivers/infiniband/hw/efa/efa_com_cmd.h b/drivers/infiniband/hw/efa/efa_com_cmd.h
> >> index c33010bbf9e8..c6234336543d 100644
> >> --- a/drivers/infiniband/hw/efa/efa_com_cmd.h
> >> +++ b/drivers/infiniband/hw/efa/efa_com_cmd.h
> >> @@ -76,6 +76,7 @@ struct efa_com_create_cq_params {
> >>       u16 eqn;
> >>       u8 entry_size_in_bytes;
> >>       bool interrupt_mode_enabled;
> >> +     bool set_src_addr;
> > Please use "u8 xxx : 1" instead of bool in structs.
> >
> > Thanks
> 
> Thanks Leon for your reply.
> 
> Is this a convention in the subsystem? This is an internal struct used
> only to bind several variables for a function call and I think using
> bool makes it more readable.
> 
> Of course if it's essential I will change this.

You should use bool xx:1 in cases like this and join all the bools in
your struct into a bitfield - unless you can justify them being split
eg due to needing a READ_ONCE/etc or something

This is expected across the kernel.

Jason

  reply	other threads:[~2022-08-17 12:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-09 15:16 [PATCH for-next] RDMA/efa: Support CQ receive entries with source GID Michael Margolin
2022-08-14 11:38 ` Gal Pressman
2022-08-14 15:04   ` Margolin, Michael
2022-08-15  6:17     ` Gal Pressman
2022-08-17 11:54       ` Margolin, Michael
2022-08-16 13:56 ` Leon Romanovsky
2022-08-17 12:18   ` Margolin, Michael
2022-08-17 12:29     ` Jason Gunthorpe [this message]
2022-08-18 13:17       ` Margolin, Michael

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=YvzfN6Ns7iaUmyGa@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=dkkranzd@amazon.com \
    --cc=firasj@amazon.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mrgolin@amazon.com \
    --cc=sleybo@amazon.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