Linux-PCI Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] PCI/P2PDMA: Fix a source code comment
@ 2019-08-15 21:28 Bart Van Assche
  2019-08-15 21:32 ` Logan Gunthorpe
  0 siblings, 1 reply; 3+ messages in thread
From: Bart Van Assche @ 2019-08-15 21:28 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: linux-pci, Bart Van Assche, Logan Gunthorpe, Christoph Hellwig,
	Keith Busch

Commit 52916982af48 ("PCI/P2PDMA: Support peer-to-peer memory"; v4.20)
introduced the following text: "there's no way to determine whether the
root complex supports forwarding between them." A later commit added a
whitelist check in the function that comment applies to. Update the
comment to reflect the addition of the whitelist check.

Cc: Logan Gunthorpe <logang@deltatee.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Keith Busch <keith.busch@intel.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/pci/p2pdma.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/p2pdma.c b/drivers/pci/p2pdma.c
index 234476226529..f719adc2b826 100644
--- a/drivers/pci/p2pdma.c
+++ b/drivers/pci/p2pdma.c
@@ -300,8 +300,8 @@ static bool root_complex_whitelist(struct pci_dev *dev)
  * Any two devices that don't have a common upstream bridge will return -1.
  * In this way devices on separate PCIe root ports will be rejected, which
  * is what we want for peer-to-peer seeing each PCIe root port defines a
- * separate hierarchy domain and there's no way to determine whether the root
- * complex supports forwarding between them.
+ * separate hierarchy domain and there's no way other than using a whitelist
+ * to determine whether the root complex supports forwarding between them.
  *
  * In the case where two devices are connected to different PCIe switches,
  * this function will still return a positive distance as long as both
-- 
2.23.0.rc1.153.gdeed80330f-goog


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] PCI/P2PDMA: Fix a source code comment
  2019-08-15 21:28 [PATCH] PCI/P2PDMA: Fix a source code comment Bart Van Assche
@ 2019-08-15 21:32 ` Logan Gunthorpe
  2019-08-15 22:41   ` Bart Van Assche
  0 siblings, 1 reply; 3+ messages in thread
From: Logan Gunthorpe @ 2019-08-15 21:32 UTC (permalink / raw)
  To: Bart Van Assche, Bjorn Helgaas; +Cc: linux-pci, Christoph Hellwig, Keith Busch



On 2019-08-15 3:28 p.m., Bart Van Assche wrote:
> Commit 52916982af48 ("PCI/P2PDMA: Support peer-to-peer memory"; v4.20)
> introduced the following text: "there's no way to determine whether the
> root complex supports forwarding between them." A later commit added a
> whitelist check in the function that comment applies to. Update the
> comment to reflect the addition of the whitelist check.

Thanks for the vigilant patch, but I've already got a series[1] that
cleans up most of these commits. It looks like this patch will conflict
with that series.

Logan

[1]
https://lore.kernel.org/linux-pci/20190812173048.9186-1-logang@deltatee.com/

> Cc: Logan Gunthorpe <logang@deltatee.com>
> Cc: Christoph Hellwig <hch@lst.de>
> Cc: Keith Busch <keith.busch@intel.com>
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> ---
>  drivers/pci/p2pdma.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/pci/p2pdma.c b/drivers/pci/p2pdma.c
> index 234476226529..f719adc2b826 100644
> --- a/drivers/pci/p2pdma.c
> +++ b/drivers/pci/p2pdma.c
> @@ -300,8 +300,8 @@ static bool root_complex_whitelist(struct pci_dev *dev)
>   * Any two devices that don't have a common upstream bridge will return -1.
>   * In this way devices on separate PCIe root ports will be rejected, which
>   * is what we want for peer-to-peer seeing each PCIe root port defines a
> - * separate hierarchy domain and there's no way to determine whether the root
> - * complex supports forwarding between them.
> + * separate hierarchy domain and there's no way other than using a whitelist
> + * to determine whether the root complex supports forwarding between them.
>   *
>   * In the case where two devices are connected to different PCIe switches,
>   * this function will still return a positive distance as long as both
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] PCI/P2PDMA: Fix a source code comment
  2019-08-15 21:32 ` Logan Gunthorpe
@ 2019-08-15 22:41   ` Bart Van Assche
  0 siblings, 0 replies; 3+ messages in thread
From: Bart Van Assche @ 2019-08-15 22:41 UTC (permalink / raw)
  To: Logan Gunthorpe, Bjorn Helgaas; +Cc: linux-pci, Christoph Hellwig, Keith Busch

On 8/15/19 2:32 PM, Logan Gunthorpe wrote:
> On 2019-08-15 3:28 p.m., Bart Van Assche wrote:
>> Commit 52916982af48 ("PCI/P2PDMA: Support peer-to-peer memory"; v4.20)
>> introduced the following text: "there's no way to determine whether the
>> root complex supports forwarding between them." A later commit added a
>> whitelist check in the function that comment applies to. Update the
>> comment to reflect the addition of the whitelist check.
> 
> Thanks for the vigilant patch, but I've already got a series[1] that
> cleans up most of these commits. It looks like this patch will conflict
> with that series.

Hi Logan,

Thanks for the pointer. I'm fine with dropping this patch.

Bart.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-15 21:28 [PATCH] PCI/P2PDMA: Fix a source code comment Bart Van Assche
2019-08-15 21:32 ` Logan Gunthorpe
2019-08-15 22:41   ` Bart Van Assche

Linux-PCI Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-pci/0 linux-pci/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-pci linux-pci/ https://lore.kernel.org/linux-pci \
		linux-pci@vger.kernel.org linux-pci@archiver.kernel.org
	public-inbox-index linux-pci


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-pci


AGPL code for this site: git clone https://public-inbox.org/ public-inbox