On Mon, Jul 04, 2016 at 12:46:31AM +0300, Or Gerlitz wrote: > On Sun, Jul 3, 2016 at 3:47 PM, Leon Romanovsky wrote: > > From: Alex Vesker > > > 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