linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Logan Gunthorpe <logang@deltatee.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
	"Stephen Bates" <sbates@raithlin.com>,
	"Christoph Hellwig" <hch@lst.de>,
	"Dan Williams" <dan.j.williams@intel.com>,
	"Jason Gunthorpe" <jgg@ziepe.ca>,
	"Christian König" <christian.koenig@amd.com>,
	"John Hubbard" <jhubbard@nvidia.com>,
	"Don Dutile" <ddutile@redhat.com>
Subject: Re: [PATCH v1 1/6] PCI/P2PDMA: Rename upstream_bridge_distance() and rework documentation
Date: Thu, 10 Jun 2021 16:25:53 -0600	[thread overview]
Message-ID: <ad142e90-86f1-4749-898f-702ae2b7cf51@deltatee.com> (raw)
In-Reply-To: <20210610220541.GA2779926@bjorn-Precision-5520>




On 2021-06-10 4:05 p.m., Bjorn Helgaas wrote:
> The new text is:
> 
>   If there are two virtual functions of the same device behind the same
>   bridge port then PCI_P2PDMA_MAP_BUS_ADDR and a distance of 2 will be
>   returned (one step down to the PCIe switch, then one step back to the
>   same device).
> 
> I *think* this includes two functions of the same multi-function
> device, or two virtual functions of the same device, right?  In both
> cases, the two devices are obviously behind the same bridge port.

Yes, that's correct, if it's the same device it must be behind the same
bridge port; so dropping the "behind the same bridge port" is a good idea.

> 
> Is this usage of "down to the PCIe switch" the common usage in P2PDMA?
> I normally think of going from an endpoint to a switch as being "up"
> toward the CPU.  But PCIe made it all confusing by putting downstream
> ports at the upstream end of links and vice versa.

Good point. I've been casually saying "down to", but you are right "up"
makes a lot more sense given the downstream/upstream terminology.

> We also have a bit of a mix in terminology between "bridge," "switch,"
> "bridge port."  I'd probably write something like:
> 
>   If they are two functions of the same device behind the same bridge,
>   return PCI_P2PDMA_MAP_BUS_ADDR and a distance of 2 (one hop up to
>   the bridge, then one hop back down to another function of the same
>   device).
> 
> No need to repost for this; just let me know what you think and I can
> tweak accordingly.

What you've written sounds good to me, but I might have just dropped the
"behind the same bridge" entirely given your feedback above.

Thanks!

Logan

  reply	other threads:[~2021-06-10 22:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-10 16:06 [PATCH v1 0/6] P2PDMA Cleanup Logan Gunthorpe
2021-06-10 16:06 ` [PATCH v1 1/6] PCI/P2PDMA: Rename upstream_bridge_distance() and rework documentation Logan Gunthorpe
2021-06-10 22:05   ` Bjorn Helgaas
2021-06-10 22:25     ` Logan Gunthorpe [this message]
2021-06-10 16:06 ` [PATCH v1 2/6] PCI/P2PDMA: Use a buffer on the stack for collecting the acs list Logan Gunthorpe
2021-06-10 16:06 ` [PATCH v1 3/6] PCI/P2PDMA: Cleanup type for return value of calc_map_type_and_dist() Logan Gunthorpe
2021-06-10 16:06 ` [PATCH v1 4/6] PCI/P2PDMA: Print a warning if the host bridge is not in the whitelist Logan Gunthorpe
2021-06-10 16:06 ` [PATCH v1 5/6] PCI/P2PDMA: Refactor pci_p2pdma_map_type() to take pagemap and device Logan Gunthorpe
2021-06-10 16:06 ` [PATCH v1 6/6] PCI/P2PDMA: Avoid pci_get_slot() which sleeps Logan Gunthorpe
2021-06-10 23:04 ` [PATCH v1 0/6] P2PDMA Cleanup Bjorn Helgaas

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=ad142e90-86f1-4749-898f-702ae2b7cf51@deltatee.com \
    --to=logang@deltatee.com \
    --cc=christian.koenig@amd.com \
    --cc=dan.j.williams@intel.com \
    --cc=ddutile@redhat.com \
    --cc=hch@lst.de \
    --cc=helgaas@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=jhubbard@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=sbates@raithlin.com \
    /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).