public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
To: Or Gerlitz <gerlitz.or-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Alex Vesker <valex-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Erez Shitrit <erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH for-next 2/2] IB/core: Support for CMA multicast join flags
Date: Mon, 4 Jul 2016 08:35:54 +0300	[thread overview]
Message-ID: <20160704053554.GC5289@leon.nu> (raw)
In-Reply-To: <CAJ3xEMitNu8HACD3EZ1kQGU4o-VyDphWFUN7qn94+LpBSV4E=w@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1897 bytes --]

On Mon, Jul 04, 2016 at 12:46:31AM +0300, Or Gerlitz wrote:
> On Sun, Jul 3, 2016 at 3:47 PM, Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:
> > From: Alex Vesker <valex-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> 
> > Added UCMA and CMA support for multicast join flags. Flags are
> > passed using UCMA CM join command previously reserved fields.
> > Currently supporting two join flags indicating two different
> > multicast JoinStates:
> [...]
> 
> > --- a/include/rdma/ib_sa.h
> > +++ b/include/rdma/ib_sa.h
> 
> > +#define IB_SA_MCMEMBER_REC_JOIN_STATE_FULL_MEMBER       BIT(0)
> > +#define IB_SA_MCMEMBER_REC_JOIN_STATE_NON_MEMBER        BIT(1)
> > +#define IB_SA_MCMEMBER_REC_JOIN_STATE_SO_NON_MEMBER     BIT(2)
> > +#define IB_SA_MCMEMBER_REC_JOIN_STATE_SO_FULL_MEMBER    BIT(3)
> > +
> 
> can we somehow avoid repeating defining these join states in 2-3
> places and either make the code introduced in commit  cd6e9b7ef
> "IB/core: Support new type of join-state for multicast"
> 
> --- a/drivers/infiniband/core/multicast.c
> +++ b/drivers/infiniband/core/multicast.c
> @@ -93,6 +93,18 @@ enum {
> 
>  struct mcast_member;
> 
> +/*
> +* There are 4 types of join states:
> +* FullMember, NonMember, SendOnlyNonMember, SendOnlyFullMember.
> +*/
> +enum {
> + FULLMEMBER_JOIN,
> + NONMEMBER_JOIN,
> + SENDONLY_NONMEBER_JOIN,
> + SENDONLY_FULLMEMBER_JOIN,
> + NUM_JOIN_MEMBERSHIP_TYPES,
> +};
> 
> to use the above defines, or the code added by this patch to use the
> enum Erez added, or both code pieces to be re-written and use some
> shared enum/define?

Good point,
Thanks

> 
> Or.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2016-07-04  5:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-03 12:47 [PATCH for-next 0/2] Support for Send Only Full Member Multicast Join Leon Romanovsky
     [not found] ` <1467550074-24061-1-git-send-email-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-07-03 12:47   ` [PATCH for-next 1/2] IB/sa: Add cached attribute containing SM information to SA port Leon Romanovsky
     [not found]     ` <1467550074-24061-2-git-send-email-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-07-05 10:37       ` Or Gerlitz
2016-07-03 12:47   ` [PATCH for-next 2/2] IB/core: Support for CMA multicast join flags Leon Romanovsky
     [not found]     ` <1467550074-24061-3-git-send-email-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-07-03 13:46       ` Or Gerlitz
     [not found]         ` <CAJ3xEMjqkn09zFXZ5Fj3wvtM3GSa=vzgTuuVoAFENToa4Zh4uw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-07-04  4:51           ` Leon Romanovsky
     [not found]             ` <20160704045111.GA5289-2ukJVAZIZ/Y@public.gmane.org>
2016-07-04 12:40               ` Or Gerlitz
     [not found]                 ` <CAJ3xEMgErk9Gu8g98dxkdjRP6aiq6hdkAOPj-a2zKLSTwaGZ0w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-07-05 10:45                   ` Leon Romanovsky
     [not found]                     ` <20160705104525.GC15009-2ukJVAZIZ/Y@public.gmane.org>
2016-07-05 12:44                       ` Or Gerlitz
2016-07-03 21:46       ` Or Gerlitz
2016-07-04  5:35         ` Leon Romanovsky [this message]
     [not found]           ` <20160704053554.GC5289-2ukJVAZIZ/Y@public.gmane.org>
2016-07-04 12:32             ` Or Gerlitz

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=20160704053554.GC5289@leon.nu \
    --to=leonro-vpraknaxozvwk0htik3j/w@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=gerlitz.or-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=valex-VPRAkNaXOzVWk0Htik3J/w@public.gmane.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