linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Allen Hubbe <allenbh@gmail.com>
To: logang@deltatee.com
Cc: linux-kernel@vger.kernel.org, linux-ntb@googlegroups.com,
	Jon Mason <jdmason@kudzu.us>,
	fancer.lancer@gmail.com, Shyam-sundar.S-k@amd.com,
	shuah@kernel.org, dmeyer@gigaio.com
Subject: Re: [PATCH v2 4/8] NTB: ntb_pingpong: Choose doorbells based on port number
Date: Tue, 24 Jul 2018 14:12:11 -0400	[thread overview]
Message-ID: <CAJ80sauPtUBJ5q9iSGPArwvetBwEkjNaRmS_6adP5moK5ejLqg@mail.gmail.com> (raw)
In-Reply-To: <8809f02e-93de-f81a-31e0-90f2c1983b70@deltatee.com>

On Tue, Jul 24, 2018 at 1:37 PM Logan Gunthorpe <logang@deltatee.com> 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 really have the API sophistication to do that.
>
> If we wanted to support multiple peers with some number in crosslink
> then we'd need to revamp things _significantly_. In this case we'd have
> multiple doorbell registers which each apply to a different subset of
> peers. This gets _very_ complicated and hurts my head.

...huh, looks like peer index was omitted from ntb_peer_db_set and
friends.  Adding peer index there would make the interface consistent
with other ntb_peer functions.  Peer index would allow the hw driver
to select which doorbell register to use for each peer.  Adding a
ntb_peer_db_valid_bits to that would allow a subset of bits in the
shared register to be associated with each peer.

I think that's all that would need to change, not significantly more,
to support multiple doorbell registers associated with different
subsets of peers.  The complication would at least be hidden in the hw
driver, where it would need to maintain some mapping from peer index
to the right set of registers.

> But as I said,
> I'm not trying to add new functionality for multi-peer crosslink or
> anything like that. I'm just trying to fix the 2 crosslink peer case so
> it works like it did when it was originally merged.

I thought for sure ntb_peer_db_set already had peer index, and I was
wrong.  Go ahead with the change as in your patch, I won't force the
issue or that you to do that extra work and touch all the drivers
again for this.  It can be addressed when there is renued interest in
making things work more than one peer.

This patch, and the others in this series:
Acked-by: Allen Hubbe <allenbh@gmail.com>

  reply	other threads:[~2018-07-24 18:12 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-20 18:00 [PATCH v2 0/8] Fix breakage caused by the NTB multi-port patchset Logan Gunthorpe
2018-07-20 18:00 ` [PATCH v2 1/8] NTB: ntb_tool: reading the link file should not end in a NULL byte Logan Gunthorpe
2018-07-20 18:00 ` [PATCH v2 2/8] NTB: Setup the DMA mask globally for all drivers Logan Gunthorpe
2018-07-20 18:00 ` [PATCH v2 3/8] NTB: Fix the default port and peer numbers for legacy drivers Logan Gunthorpe
2018-07-20 18:00 ` [PATCH v2 4/8] NTB: ntb_pingpong: Choose doorbells based on port number Logan Gunthorpe
2018-07-23 14:01   ` Allen Hubbe
2018-07-23 16:07     ` Logan Gunthorpe
2018-07-24 17:26       ` Allen Hubbe
2018-07-24 17:37         ` Logan Gunthorpe
2018-07-24 18:12           ` Allen Hubbe [this message]
2018-07-24 18:23             ` Logan Gunthorpe
2018-07-20 18:00 ` [PATCH v2 5/8] NTB: perf: Don't require one more memory window than number of peers Logan Gunthorpe
2018-07-20 18:00 ` [PATCH v2 6/8] NTB: perf: Fix support for hardware that doesn't have port numbers Logan Gunthorpe
2018-07-20 18:00 ` [PATCH v2 7/8] NTB: perf: Fix race condition when run with ntb_test Logan Gunthorpe
2018-07-20 18:00 ` [PATCH v2 8/8] NTB: ntb_test: Fix bug when counting remote files Logan Gunthorpe
2018-09-17 15:16 ` [PATCH v2 0/8] Fix breakage caused by the NTB multi-port patchset Alexander Fomichev
2018-09-17 16:06   ` Logan Gunthorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJ80sauPtUBJ5q9iSGPArwvetBwEkjNaRmS_6adP5moK5ejLqg@mail.gmail.com \
    --to=allenbh@gmail.com \
    --cc=Shyam-sundar.S-k@amd.com \
    --cc=dmeyer@gigaio.com \
    --cc=fancer.lancer@gmail.com \
    --cc=jdmason@kudzu.us \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-ntb@googlegroups.com \
    --cc=logang@deltatee.com \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).