Message ID | CAJ3xEMitNu8HACD3EZ1kQGU4o-VyDphWFUN7qn94+LpBSV4E=w@mail.gmail.com (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
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@kernel.org> wrote: > > From: Alex Vesker <valex@mellanox.com> > > > 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@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, Jul 4, 2016 at 8:35 AM, Leon Romanovsky <leonro@mellanox.com> wrote: > On Mon, Jul 04, 2016 at 12:46:31AM +0300, Or Gerlitz wrote: >> 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, indeed, avoid it in your V2 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
--- 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?