From: Bjorn Helgaas <helgaas@kernel.org>
To: Dongdong Liu <liudongdong3@huawei.com>
Cc: hch@infradead.org, kw@linux.com, logang@deltatee.com,
leon@kernel.org, linux-pci@vger.kernel.org, rajur@chelsio.com,
hverkuil-cisco@xs4all.nl, linux-media@vger.kernel.org,
netdev@vger.kernel.org
Subject: Re: [PATCH V10 6/8] PCI/P2PDMA: Add a 10-Bit Tag check in P2PDMA
Date: Wed, 27 Oct 2021 18:11:34 -0500 [thread overview]
Message-ID: <20211027231134.GA258571@bhelgaas> (raw)
In-Reply-To: <20211009104938.48225-7-liudongdong3@huawei.com>
On Sat, Oct 09, 2021 at 06:49:36PM +0800, Dongdong Liu wrote:
> Add a 10-Bit Tag check in the P2PDMA code to ensure that a device with
> 10-Bit Tag Requester doesn't interact with a device that does not
> support 10-Bit Tag Completer. Before that happens, the kernel should
> emit a warning.
> Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
> Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
> @@ -532,6 +577,9 @@ calc_map_type_and_dist(struct pci_dev *provider, struct pci_dev *client,
> map_type = PCI_P2PDMA_MAP_NOT_SUPPORTED;
> }
> done:
> + if (pci_10bit_tags_unsupported(client, provider, verbose))
> + map_type = PCI_P2PDMA_MAP_NOT_SUPPORTED;
I need to be convinced that this check is in the right spot to catch
all potential P2PDMA situations. The pci_p2pmem_find() and
pci_p2pdma_distance() interfaces eventually call
calc_map_type_and_dist(). But those interfaces don't actually produce
DMA bus addresses, and I'm not convinced that all P2PDMA users use
them.
nvme *does* use them, but infiniband (rdma_rw_map_sg()) does not, and
it calls pci_p2pdma_map_sg().
amdgpu_dma_buf_attach() calls pci_p2pdma_distance_many() but I don't
know where it sets up P2PDMA transactions.
cxgb4 and qed mention "peer2peer", but I don't know whether they are
related; they don't seem to use any pci_p2p.* interfaces.
> rcu_read_lock();
> p2pdma = rcu_dereference(provider->p2pdma);
> if (p2pdma)
> --
> 2.22.0
>
next prev parent reply other threads:[~2021-10-27 23:11 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-09 10:49 [PATCH V10 0/8] PCI: Enable 10-Bit tag support for PCIe devices Dongdong Liu
2021-10-09 10:49 ` [PATCH V10 1/8] PCI: Use cached devcap in more places Dongdong Liu
2021-10-09 10:49 ` [PATCH V10 2/8] PCI: Cache Device Capabilities 2 Register Dongdong Liu
2021-10-09 10:49 ` [PATCH V10 3/8] PCI: Add 10-Bit Tag register definitions Dongdong Liu
2021-10-09 10:49 ` [PATCH V10 4/8] PCI/sysfs: Add a 10-Bit Tag sysfs file PCIe Endpoint devices Dongdong Liu
2021-10-27 22:28 ` Bjorn Helgaas
2021-10-28 7:44 ` Dongdong Liu
2021-10-28 17:24 ` Bjorn Helgaas
2021-10-29 7:16 ` Dongdong Liu
2021-10-09 10:49 ` [PATCH V10 5/8] PCI/IOV: Add 10-Bit Tag sysfs files for VF devices Dongdong Liu
2021-10-09 10:49 ` [PATCH V10 6/8] PCI/P2PDMA: Add a 10-Bit Tag check in P2PDMA Dongdong Liu
2021-10-27 21:20 ` Bjorn Helgaas
2021-10-28 7:56 ` Dongdong Liu
2021-10-27 23:11 ` Bjorn Helgaas [this message]
2021-10-27 23:41 ` Logan Gunthorpe
2021-10-28 1:39 ` Bjorn Helgaas
2021-10-28 15:56 ` Logan Gunthorpe
2021-10-09 10:49 ` [PATCH V10 7/8] PCI: Enable 10-Bit Tag support for PCIe Endpoint device Dongdong Liu
2021-10-09 10:49 ` [PATCH V10 8/8] PCI/IOV: Enable 10-Bit Tag support for PCIe VF devices Dongdong Liu
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=20211027231134.GA258571@bhelgaas \
--to=helgaas@kernel.org \
--cc=hch@infradead.org \
--cc=hverkuil-cisco@xs4all.nl \
--cc=kw@linux.com \
--cc=leon@kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=liudongdong3@huawei.com \
--cc=logang@deltatee.com \
--cc=netdev@vger.kernel.org \
--cc=rajur@chelsio.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