[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJ80saunKS6hbNFBKjbQqSo32+KeLZurksCtnHNw-C35Zjq2Xw@mail.gmail.com>
Date: Tue, 24 Jul 2018 13:26:12 -0400
From: Allen Hubbe <allenbh@...il.com>
To: logang@...tatee.com
Cc: linux-kernel@...r.kernel.org, linux-ntb@...glegroups.com,
Jon Mason <jdmason@...zu.us>, fancer.lancer@...il.com,
Shyam-sundar.S-k@....com, shuah@...nel.org, dmeyer@...aio.com
Subject: Re: [PATCH v2 4/8] NTB: ntb_pingpong: Choose doorbells based on port number
On Mon, Jul 23, 2018 at 12:08 PM Logan Gunthorpe <logang@...tatee.com> 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 same index, and also that the range of index values is bounded.
Port numbers are problematic, so I'm worried about the change to use
port number in the client drivers instead of using index. For
example, this change assumes that the index value is < bits per long
long, because the value is used in BIT_ULL(port number).
Maybe I'm missing something... In the crosslink case, there is
another doorbell register on the other side of the crosslink. Whether
to use the nearby or via-crosslink doorbell depends on the peer
index... making assumptions about the hw driver, but is that about
right? Then you are selecting bits in the doorbell register based on
port number, ok, that must be how the bits of the shared db register
are associated with ports in your configuration. Maybe what's
actually needed is a ntb_peer_db_valid_mask(peer index), and if only
the port-numbered db bit (or any other combination) is valid for that
peer, so be it, that can be an implementation choice of the hw driver
and below.
Powered by blists - more mailing lists