From: Niklas Cassel <cassel@kernel.org>
To: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Cc: kw@linux.com, gregkh@linuxfoundation.org, arnd@arndb.de,
lpieralisi@kernel.org, shuah@kernel.org, kishon@kernel.org,
aman1.gupta@samsung.com, p.rajanbabu@samsung.com,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
bhelgaas@google.com, linux-arm-msm@vger.kernel.org,
robh@kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH v2 4/4] selftests: pci_endpoint: Migrate to Kselftest framework
Date: Fri, 29 Nov 2024 17:42:26 +0100 [thread overview]
Message-ID: <Z0nu8n5GEuZ0zaBD@ryzen> (raw)
In-Reply-To: <20241129163555.apf35xa6x5joscha@thinkpad>
On Fri, Nov 29, 2024 at 10:05:55PM +0530, Manivannan Sadhasivam wrote:
> On Fri, Nov 29, 2024 at 02:51:26PM +0100, Niklas Cassel wrote:
> > Hello Mani,
> >
> > On Fri, Nov 29, 2024 at 02:54:15PM +0530, Manivannan Sadhasivam wrote:
> > > Migrate the PCI endpoint test to Kselftest framework. All the tests that
> > > were part of the previous pcitest.sh file were migrated.
> > >
> > > Below is the exclusive list of tests:
> > >
> > > 1. BAR Tests (BAR0 to BAR5)
> > > 2. Legacy IRQ Tests
> > > 3. MSI Interrupt Tests (MSI1 to MSI32)
> > > 4. MSI-X Interrupt Tests (MSI-X1 to MSI-X2048)
> > > 5. Read Tests - MEMCPY (For 1, 1024, 1025, 1024000, 1024001 Bytes)
> > > 6. Write Tests - MEMCPY (For 1, 1024, 1025, 1024000, 1024001 Bytes)
> > > 7. Copy Tests - MEMCPY (For 1, 1024, 1025, 1024000, 1024001 Bytes)
> > > 8. Read Tests - DMA (For 1, 1024, 1025, 1024000, 1024001 Bytes)
> > > 9. Write Tests - DMA (For 1, 1024, 1025, 1024000, 1024001 Bytes)
> > > 10. Copy Tests - DMA (For 1, 1024, 1025, 1024000, 1024001 Bytes)
> >
> > I'm not sure if it is a great idea to add test case number 10.
> >
> > While it will work if you use the "dummy memcpy" DMA channel which uses
> > MMIO under the hood, if you actually enable a real DMA controller (which
> > often sets the DMA_PRIVATE cap in the DMA controller driver (e.g. if you
> > are using a DWC based PCIe EP controller and select CONFIG_DW_EDMA=y)),
> > pci_epf_test_copy() will fail with:
> > [ 93.779444] pci_epf_test pci_epf_test.0: Cannot transfer data using DMA
> >
>
> So the idea is to exercise all the options provided by the epf-test driver. In
> that sense, we need to have the DMA COPY test. However, I do agree that the
> common DMA controllers will fail this case. So how about just simulating the DMA
> COPY for controllers implementing DMA_PRIVATE cap? I don't think it hurts to
> have this feature in test driver.
I guess you could modify pci-epf-test to simply do MMIO in test_copy(),
if USE_DMA && DMA_PRIVATE is set, as you suggest.
We should probably print a warning/info that we are falling back to MMIO
in that case though.
Kind regards,
Niklas
next prev parent reply other threads:[~2024-11-29 16:42 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-29 9:24 [PATCH v2 0/4] Migrate PCI Endpoint Subsystem tests to Kselftest Manivannan Sadhasivam
2024-11-29 9:24 ` [PATCH v2 1/4] PCI: qcom-ep: Mark BAR0/BAR2 as 64bit BARs and BAR1/BAR3 as RESERVED Manivannan Sadhasivam
2024-11-29 14:38 ` Dmitry Baryshkov
2024-11-29 19:55 ` Bjorn Helgaas
2024-11-30 16:17 ` Greg KH
2024-12-02 12:58 ` Manivannan Sadhasivam
2024-12-02 17:40 ` Bjorn Helgaas
2024-11-29 9:24 ` [PATCH v2 2/4] misc: pci_endpoint_test: Fix the return value of IOCTL Manivannan Sadhasivam
2024-11-29 10:51 ` Damien Le Moal
2024-11-29 16:30 ` Manivannan Sadhasivam
2024-12-11 7:47 ` Manivannan Sadhasivam
2024-11-29 9:24 ` [PATCH v2 3/4] selftests: Move PCI Endpoint tests from tools/pci to Kselftests Manivannan Sadhasivam
2024-11-29 9:24 ` [PATCH v2 4/4] selftests: pci_endpoint: Migrate to Kselftest framework Manivannan Sadhasivam
2024-11-29 13:51 ` Niklas Cassel
2024-11-29 16:35 ` Manivannan Sadhasivam
2024-11-29 16:42 ` Niklas Cassel [this message]
2024-11-29 16:52 ` Manivannan Sadhasivam
2024-11-29 17:13 ` Niklas Cassel
2024-11-29 18:25 ` Manivannan Sadhasivam
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=Z0nu8n5GEuZ0zaBD@ryzen \
--to=cassel@kernel.org \
--cc=aman1.gupta@samsung.com \
--cc=arnd@arndb.de \
--cc=bhelgaas@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=kishon@kernel.org \
--cc=kw@linux.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=p.rajanbabu@samsung.com \
--cc=robh@kernel.org \
--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