Re: [PATCH] IB/core: Make ib_mad_client_id atomic

2018-05-01 Thread Håkon Bugge
> On 1 May 2018, at 06:38, jackm wrote: > > On Mon, 30 Apr 2018 13:10:49 -0400 > Doug Ledford wrote: > > Looks good! Yes, absolutely! Håkon > > -Jack > >> On Mon, 2018-04-30 at 08:49 -0600, Jason Gunthorpe wrote: >>> On Mon, Apr 23, 2018 at

Re: [PATCH] IB/core: Make ib_mad_client_id atomic

2018-05-01 Thread Håkon Bugge
> On 1 May 2018, at 06:38, jackm wrote: > > On Mon, 30 Apr 2018 13:10:49 -0400 > Doug Ledford wrote: > > Looks good! Yes, absolutely! Håkon > > -Jack > >> On Mon, 2018-04-30 at 08:49 -0600, Jason Gunthorpe wrote: >>> On Mon, Apr 23, 2018 at 10:16:18PM +0300, jackm wrote: >>> >>

Re: [PATCH] IB/core: Make ib_mad_client_id atomic

2018-04-30 Thread jackm
On Mon, 30 Apr 2018 13:10:49 -0400 Doug Ledford wrote: Looks good! -Jack > On Mon, 2018-04-30 at 08:49 -0600, Jason Gunthorpe wrote: > > On Mon, Apr 23, 2018 at 10:16:18PM +0300, jackm wrote: > > > > > > > TIDs need to be globally unique on the entire machine. > > >

Re: [PATCH] IB/core: Make ib_mad_client_id atomic

2018-04-30 Thread jackm
On Mon, 30 Apr 2018 13:10:49 -0400 Doug Ledford wrote: Looks good! -Jack > On Mon, 2018-04-30 at 08:49 -0600, Jason Gunthorpe wrote: > > On Mon, Apr 23, 2018 at 10:16:18PM +0300, jackm wrote: > > > > > > > TIDs need to be globally unique on the entire machine. > > > Jason, that is not

Re: [PATCH] IB/core: Make ib_mad_client_id atomic

2018-04-30 Thread Jason Gunthorpe
On Mon, Apr 30, 2018 at 01:10:49PM -0400, Doug Ledford wrote: > On Mon, 2018-04-30 at 08:49 -0600, Jason Gunthorpe wrote: > > On Mon, Apr 23, 2018 at 10:16:18PM +0300, jackm wrote: > > > > > > > TIDs need to be globally unique on the entire machine. > > > Jason, that is not exactly correct. > >

Re: [PATCH] IB/core: Make ib_mad_client_id atomic

2018-04-30 Thread Jason Gunthorpe
On Mon, Apr 30, 2018 at 01:10:49PM -0400, Doug Ledford wrote: > On Mon, 2018-04-30 at 08:49 -0600, Jason Gunthorpe wrote: > > On Mon, Apr 23, 2018 at 10:16:18PM +0300, jackm wrote: > > > > > > > TIDs need to be globally unique on the entire machine. > > > Jason, that is not exactly correct. > >

RE: [PATCH] IB/core: Make ib_mad_client_id atomic

2018-04-30 Thread Weiny, Ira
Hiatt, Don > <don.hi...@intel.com>; Dasaratharaman Chandramouli > <dasaratharaman.chandramo...@intel.com>; Weiny, Ira <ira.we...@intel.com>; > Hefty, Sean <sean.he...@intel.com>; OFED mailing list r...@vger.kernel.org>; linux-kernel@vger.kernel.org > Subject: Re: [PATCH

RE: [PATCH] IB/core: Make ib_mad_client_id atomic

2018-04-30 Thread Weiny, Ira
n ; OFED mailing list r...@vger.kernel.org>; linux-kernel@vger.kernel.org > Subject: Re: [PATCH] IB/core: Make ib_mad_client_id atomic > > On Mon, 2018-04-30 at 08:49 -0600, Jason Gunthorpe wrote: > > On Mon, Apr 23, 2018 at 10:16:18PM +0300, jackm wrote: > > > > >

Re: [PATCH] IB/core: Make ib_mad_client_id atomic

2018-04-30 Thread Doug Ledford
On Mon, 2018-04-30 at 08:49 -0600, Jason Gunthorpe wrote: > On Mon, Apr 23, 2018 at 10:16:18PM +0300, jackm wrote: > > > > > TIDs need to be globally unique on the entire machine. > > Jason, that is not exactly correct. > > The expecation for /dev/umad users is that they all receive locally >

Re: [PATCH] IB/core: Make ib_mad_client_id atomic

2018-04-30 Thread Doug Ledford
On Mon, 2018-04-30 at 08:49 -0600, Jason Gunthorpe wrote: > On Mon, Apr 23, 2018 at 10:16:18PM +0300, jackm wrote: > > > > > TIDs need to be globally unique on the entire machine. > > Jason, that is not exactly correct. > > The expecation for /dev/umad users is that they all receive locally >

Re: [PATCH] IB/core: Make ib_mad_client_id atomic

2018-04-30 Thread Jason Gunthorpe
On Mon, Apr 23, 2018 at 10:16:18PM +0300, jackm wrote: > > > TIDs need to be globally unique on the entire machine. > Jason, that is not exactly correct. The expecation for /dev/umad users is that they all receive locally unique TID prefixes. The kernel may be OK to keep things port-specific

Re: [PATCH] IB/core: Make ib_mad_client_id atomic

2018-04-30 Thread Jason Gunthorpe
On Mon, Apr 23, 2018 at 10:16:18PM +0300, jackm wrote: > > > TIDs need to be globally unique on the entire machine. > Jason, that is not exactly correct. The expecation for /dev/umad users is that they all receive locally unique TID prefixes. The kernel may be OK to keep things port-specific

Re: [PATCH] IB/core: Make ib_mad_client_id atomic

2018-04-30 Thread Håkon Bugge
> On 27 Apr 2018, at 21:08, Doug Ledford wrote: > > On Thu, 2018-04-26 at 20:51 +0200, Håkon Bugge wrote: >>> Jason is out this week. I'll end up processing this one (probably later >>> today). But I’ll fix up the commit message to suit my tastes when I do. >> >> Thank

Re: [PATCH] IB/core: Make ib_mad_client_id atomic

2018-04-30 Thread Håkon Bugge
> On 27 Apr 2018, at 21:08, Doug Ledford wrote: > > On Thu, 2018-04-26 at 20:51 +0200, Håkon Bugge wrote: >>> Jason is out this week. I'll end up processing this one (probably later >>> today). But I’ll fix up the commit message to suit my tastes when I do. >> >> Thank you, Doug and Jack, >

Re: [PATCH] IB/core: Make ib_mad_client_id atomic

2018-04-27 Thread Doug Ledford
On Thu, 2018-04-26 at 20:51 +0200, Håkon Bugge wrote: > > Jason is out this week. I'll end up processing this one (probably later > > today). But I’ll fix up the commit message to suit my tastes when I do. > > Thank you, Doug and Jack, I reworded the commit message, let me know if you think I

Re: [PATCH] IB/core: Make ib_mad_client_id atomic

2018-04-27 Thread Doug Ledford
On Thu, 2018-04-26 at 20:51 +0200, Håkon Bugge wrote: > > Jason is out this week. I'll end up processing this one (probably later > > today). But I’ll fix up the commit message to suit my tastes when I do. > > Thank you, Doug and Jack, I reworded the commit message, let me know if you think I

Re: [PATCH] IB/core: Make ib_mad_client_id atomic

2018-04-26 Thread jackm
On Thu, 26 Apr 2018 18:06:10 +0200 Håkon Bugge wrote: > > On 23 Apr 2018, at 21:16, jackm wrote: > > > > On Mon, 23 Apr 2018 16:19:57 +0200 > > Håkon Bugge wrote: > > > > > >>> > >>> This actually looks like a

Re: [PATCH] IB/core: Make ib_mad_client_id atomic

2018-04-26 Thread jackm
On Thu, 26 Apr 2018 18:06:10 +0200 Håkon Bugge wrote: > > On 23 Apr 2018, at 21:16, jackm wrote: > > > > On Mon, 23 Apr 2018 16:19:57 +0200 > > Håkon Bugge wrote: > > > > > >>> > >>> This actually looks like a genuine bug, why is it described only > >>> as 'confusing'?

Re: [PATCH] IB/core: Make ib_mad_client_id atomic

2018-04-26 Thread Håkon Bugge
> On 23 Apr 2018, at 21:16, jackm wrote: > > On Mon, 23 Apr 2018 16:19:57 +0200 > Håkon Bugge wrote: > > >>> >>> This actually looks like a genuine bug, why is it described only as >>> 'confusing'? ib_register_mad_agent is callable from

Re: [PATCH] IB/core: Make ib_mad_client_id atomic

2018-04-26 Thread Håkon Bugge
> On 23 Apr 2018, at 21:16, jackm wrote: > > On Mon, 23 Apr 2018 16:19:57 +0200 > Håkon Bugge wrote: > > >>> >>> This actually looks like a genuine bug, why is it described only as >>> 'confusing'? ib_register_mad_agent is callable from userspace, so at >>> least two userspace agents can

Re: [PATCH] IB/core: Make ib_mad_client_id atomic

2018-04-23 Thread jackm
On Mon, 23 Apr 2018 16:19:57 +0200 Håkon Bugge wrote: > > > > This actually looks like a genuine bug, why is it described only as > > 'confusing'? ib_register_mad_agent is callable from userspace, so at > > least two userspace agents can race and get the same TID’s.

Re: [PATCH] IB/core: Make ib_mad_client_id atomic

2018-04-23 Thread jackm
On Mon, 23 Apr 2018 16:19:57 +0200 Håkon Bugge wrote: > > > > This actually looks like a genuine bug, why is it described only as > > 'confusing'? ib_register_mad_agent is callable from userspace, so at > > least two userspace agents can race and get the same TID’s. > > My understanding is

Re: [PATCH] IB/core: Make ib_mad_client_id atomic

2018-04-23 Thread Håkon Bugge
+Jack > On 20 Apr 2018, at 17:34, Jason Gunthorpe wrote: > > On Thu, Apr 19, 2018 at 11:55:55PM -0400, Doug Ledford wrote: >> On Wed, 2018-04-18 at 16:24 +0200, Håkon Bugge wrote: >>> Two kernel threads may get the same value for agent.hi_tid, if the >>> agents are registered

Re: [PATCH] IB/core: Make ib_mad_client_id atomic

2018-04-23 Thread Håkon Bugge
+Jack > On 20 Apr 2018, at 17:34, Jason Gunthorpe wrote: > > On Thu, Apr 19, 2018 at 11:55:55PM -0400, Doug Ledford wrote: >> On Wed, 2018-04-18 at 16:24 +0200, Håkon Bugge wrote: >>> Two kernel threads may get the same value for agent.hi_tid, if the >>> agents are registered for different

Re: [PATCH] IB/core: Make ib_mad_client_id atomic

2018-04-20 Thread Jason Gunthorpe
On Thu, Apr 19, 2018 at 11:55:55PM -0400, Doug Ledford wrote: > On Wed, 2018-04-18 at 16:24 +0200, Håkon Bugge wrote: > > Two kernel threads may get the same value for agent.hi_tid, if the > > agents are registered for different ports. As of now, this works, as > > the agent list is per port. > >

Re: [PATCH] IB/core: Make ib_mad_client_id atomic

2018-04-20 Thread Jason Gunthorpe
On Thu, Apr 19, 2018 at 11:55:55PM -0400, Doug Ledford wrote: > On Wed, 2018-04-18 at 16:24 +0200, Håkon Bugge wrote: > > Two kernel threads may get the same value for agent.hi_tid, if the > > agents are registered for different ports. As of now, this works, as > > the agent list is per port. > >

Re: [PATCH] IB/core: Make ib_mad_client_id atomic

2018-04-19 Thread Doug Ledford
On Wed, 2018-04-18 at 16:24 +0200, Håkon Bugge wrote: > Two kernel threads may get the same value for agent.hi_tid, if the > agents are registered for different ports. As of now, this works, as > the agent list is per port. > > It is however confusing and not future robust. Hence, making it >

Re: [PATCH] IB/core: Make ib_mad_client_id atomic

2018-04-19 Thread Doug Ledford
On Wed, 2018-04-18 at 16:24 +0200, Håkon Bugge wrote: > Two kernel threads may get the same value for agent.hi_tid, if the > agents are registered for different ports. As of now, this works, as > the agent list is per port. > > It is however confusing and not future robust. Hence, making it >

Re: [PATCH] IB/core: Make ib_mad_client_id atomic

2018-04-18 Thread Yanjun Zhu
On 2018/4/18 22:24, Håkon Bugge wrote: Two kernel threads may get the same value for agent.hi_tid, if the agents are registered for different ports. As of now, this works, as the agent list is per port. It is however confusing and not future robust. Hence, making it atomic. Signed-off-by:

Re: [PATCH] IB/core: Make ib_mad_client_id atomic

2018-04-18 Thread Yanjun Zhu
On 2018/4/18 22:24, Håkon Bugge wrote: Two kernel threads may get the same value for agent.hi_tid, if the agents are registered for different ports. As of now, this works, as the agent list is per port. It is however confusing and not future robust. Hence, making it atomic. Signed-off-by:

RE: [PATCH] IB/core: Make ib_mad_client_id atomic

2018-04-18 Thread Weiny, Ira
> > Two kernel threads may get the same value for agent.hi_tid, if the agents are > registered for different ports. As of now, this works, as the agent list is > per port. > > It is however confusing and not future robust. Hence, making it atomic. > > Signed-off-by: Håkon Bugge

RE: [PATCH] IB/core: Make ib_mad_client_id atomic

2018-04-18 Thread Weiny, Ira
> > Two kernel threads may get the same value for agent.hi_tid, if the agents are > registered for different ports. As of now, this works, as the agent list is > per port. > > It is however confusing and not future robust. Hence, making it atomic. > > Signed-off-by: Håkon Bugge > Reviewed-by:

[PATCH] IB/core: Make ib_mad_client_id atomic

2018-04-18 Thread Håkon Bugge
Two kernel threads may get the same value for agent.hi_tid, if the agents are registered for different ports. As of now, this works, as the agent list is per port. It is however confusing and not future robust. Hence, making it atomic. Signed-off-by: Håkon Bugge

[PATCH] IB/core: Make ib_mad_client_id atomic

2018-04-18 Thread Håkon Bugge
Two kernel threads may get the same value for agent.hi_tid, if the agents are registered for different ports. As of now, this works, as the agent list is per port. It is however confusing and not future robust. Hence, making it atomic. Signed-off-by: Håkon Bugge Reviewed-by: Jack Morgenstein