Re: [PATCH v2 4/8] NTB: ntb_pingpong: Choose doorbells based on port number

2018-07-24 Thread Logan Gunthorpe
On 24/07/18 12:12 PM, Allen Hubbe wrote: > On Tue, Jul 24, 2018 at 1:37 PM Logan Gunthorpe wrote: >> Not really. Given that we know there are only two peers, we always use >> the other side's doorbell register. You'd only use the nearby doorbell >> register if you wanted to trigger your own int

Re: [PATCH v2 4/8] NTB: ntb_pingpong: Choose doorbells based on port number

2018-07-24 Thread Allen Hubbe
On Tue, Jul 24, 2018 at 1:37 PM Logan Gunthorpe wrote: > Not really. Given that we know there are only two peers, we always use > the other side's doorbell register. You'd only use the nearby doorbell > register if you wanted to trigger your own interrupt -- that would be > weird and we don't real

Re: [PATCH v2 4/8] NTB: ntb_pingpong: Choose doorbells based on port number

2018-07-24 Thread Logan Gunthorpe
On 24/07/18 11:26 AM, Allen Hubbe wrote: > On Mon, Jul 23, 2018 at 12:08 PM Logan Gunthorpe wrote: >> I don't think you'll ever have a case where two peers have the same >> index, as the index is really an abstract concept the hardware doesn't >> really know about. > > That is the point of ind

Re: [PATCH v2 4/8] NTB: ntb_pingpong: Choose doorbells based on port number

2018-07-24 Thread Allen Hubbe
On Mon, Jul 23, 2018 at 12:08 PM Logan Gunthorpe wrote: > I don't think you'll ever have a case where two peers have the same > index, as the index is really an abstract concept the hardware doesn't > really know about. That is the point of index, that there should never be two peers with the sam

Re: [PATCH v2 4/8] NTB: ntb_pingpong: Choose doorbells based on port number

2018-07-23 Thread Logan Gunthorpe
On 23/07/18 08:01 AM, Allen Hubbe wrote: > Does this solve the issue where two of the the port numbers are the > same, because of symmetry over a crosslink? I think the two ports > with the "same" number should be identified as different peer index, > even if the port numbers are the same. I'm

Re: [PATCH v2 4/8] NTB: ntb_pingpong: Choose doorbells based on port number

2018-07-23 Thread Allen Hubbe
On Fri, Jul 20, 2018 at 2:00 PM Logan Gunthorpe wrote: > > This commit fixes pingpong support for existing drivers that do not > implement ntb_default_port_number() and ntb_default_peer_port_number(). > This is required for hardware (like the crosslink topology of > switchtec) which cannot assign

[PATCH v2 4/8] NTB: ntb_pingpong: Choose doorbells based on port number

2018-07-20 Thread Logan Gunthorpe
This commit fixes pingpong support for existing drivers that do not implement ntb_default_port_number() and ntb_default_peer_port_number(). This is required for hardware (like the crosslink topology of switchtec) which cannot assign reasonable port numbers to each port due to its perfect symmetry.