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

From: Logan Gunthorpe
Date: Fri Jun 15 2018 - 15:56:40 EST




On 15/06/18 01:49 PM, Serge Semin wrote:
> Regarding the patch. The idea of using the port number instead of linearised
> unique index should also work for Intel/AMD/IDT drivers. But the ports-space
> linearization algorithm was created for the case if the real port numbers
> would exceed the available Doorbell bits. I thought this might be the case of
> multi-ports version of the switchtec driver.

Well, the switchtec driver splits its 64 doorbells in two sets, one for
each port right now. That will likely have to change when we go to a
multi-port implementation. In that case we will have 64 doorbells and a
maximum 48 ports. So I don't think we have to concern ourselves with
more ports than doorbells.

> Needless to say, that if Switchtec driver had the ports-index API implementation,
> this patch wouldn't be needed.

As I've said, it's impossible to write for the crosslink topology so the
clients must support that case.

Logan