Re: [PATCH 3/8] IPoIB: fix MCAST_FLAG_BUSY usage

2014-08-26 Thread Wendy Cheng
On Mon, Aug 25, 2014 at 1:03 PM, Doug Ledford wrote: > >> On Aug 25, 2014, at 2:51 PM, Wendy Cheng wrote: >> >> Is it really possible for ib_sa_join_multicast() to >> return *after* its callback (ipoib_mcast_sendonly_join_complete and >> ipoib_mcast_join_complete) ? > > Yes. They are both on wor

Re: [PATCH 3/8] IPoIB: fix MCAST_FLAG_BUSY usage

2014-08-25 Thread Doug Ledford
> On Aug 25, 2014, at 2:51 PM, Wendy Cheng wrote: > >> On Tue, Aug 19, 2014 at 1:28 PM, Doug Ledford wrote: >> >> So that's why in this patch we >> >> 1) take a mutex to force ib_sa_join_multicast to return and us to set >> mcast->mc to the proper return value before we process the join comp

Re: [PATCH 3/8] IPoIB: fix MCAST_FLAG_BUSY usage

2014-08-25 Thread Wendy Cheng
On Tue, Aug 19, 2014 at 1:28 PM, Doug Ledford wrote: > So that's why in this patch we > > 1) take a mutex to force ib_sa_join_multicast to return and us to set > mcast->mc to the proper return value before we process the join completion > callback > 2) always clear mcast->mc if there is any err

Re: [PATCH 3/8] IPoIB: fix MCAST_FLAG_BUSY usage

2014-08-19 Thread Doug Ledford
Excuse my top posting, I'm at a meeting and not using my normal mail client. To answer your question, this is a confusing issue that I had to work through myself. When we call ib_sa_multicast_join, it will create a record for us and return that. That record is not valid for us to call ib_sa_mu

Re: [PATCH 3/8] IPoIB: fix MCAST_FLAG_BUSY usage

2014-08-19 Thread Wendy Cheng
On Tue, Aug 12, 2014 at 4:38 PM, Doug Ledford wrote: > Commit a9c8ba5884 (IPoIB: Fix usage of uninitialized multicast objects) > added a new flag MCAST_JOIN_STARTED, but was not very strict in how it > was used. We didn't always initialize the completion struct before we > set the flag, and we di

[PATCH 3/8] IPoIB: fix MCAST_FLAG_BUSY usage

2014-08-12 Thread Doug Ledford
Commit a9c8ba5884 (IPoIB: Fix usage of uninitialized multicast objects) added a new flag MCAST_JOIN_STARTED, but was not very strict in how it was used. We didn't always initialize the completion struct before we set the flag, and we didn't always call complete on the completion struct from all pa