mbox series

[v2,0/3] Increase test compatibility with PA IOVA

Message ID 20210604141601.275430-1-kda@semihalf.com (mailing list archive)
Headers
Series Increase test compatibility with PA IOVA |

Message

Stanislaw Kardach June 4, 2021, 2:15 p.m. UTC
While working on a RISC-V port, using a HiFive Unmatched (FU740) which
does not have IOMMU (hence only RTE_IOVA_PA is available), I've noticed
that some of the EAL tests are failing because of a totally different
reason than the test itself.
Namely the --no-huge flag and --iova-mode=pa can't be used together and
EAL init fails warning about a lack of access to physical addresses.
This patchset tries to cleanup the --no-huge usage so that it doesn't
hide the real state of tests when RTE_IOVA_PA is used (i.e. on platforms
without IOMMU).

I'm proposing to skip the no-huge test for RTE_IOVA_PA environments as
it is not supported by design as well as removing no-huge usage on Linux
as it seems that it is used (along with --no-shconf) to increase the
compatibility with FreeBSD.

Please let me know if I'm missing a bigger picture with the --no-huge
and --no-shconf usage on non-FreeBSD platforms.

I'm not adding stable@dpdk.org on purpose as this does not affect any
current platform I'm aware of (at least in a production scenario).

---

V2:
- Fix checkpatch errors
- Add affected platform in the cover letter.

Stanislaw Kardach (3):
  test: disable no-huge test with PA IOVA
  test: disable no-huge where it's not necessary
  test: fix the -n unit test description

 app/test/test_eal_flags.c | 63 ++++++++++++++++++++++++++-------------
 1 file changed, 42 insertions(+), 21 deletions(-)
  

Comments

Stanislaw Kardach June 10, 2021, 7:51 a.m. UTC | #1
On Fri, Jun 04, 2021 at 04:15:58PM +0200, Stanislaw Kardach wrote:
> Please let me know if I'm missing a bigger picture with the --no-huge
> and --no-shconf usage on non-FreeBSD platforms.
> 
After looking at this issue again I'm abandoning this patchset because
it seems wrong for 2 reasons:

1. --iova-mode=pa and --no-huge combination is still unsupported but
   detecting such situation is not straightforward in the
   eal_flags_no_huge_autotest. That is because it is not only a product
   of user input but IOMMU requirements (if any), bus requirements and
   PA map availability. If a PCI device is bound to UIO and no IOMMU is
   avilable, then bus requests PA mapping. However if there's no UIO
   device, PCI reports DC and therefore decision relies on PA map
   availability. If it's not available, VA will be chosen. This changes
   between the parent dpdk-test binary being run (available->PA) and the
   child processes being spawned by the test (not-available->VA).
   However rte_eal_iova_mode() only reports the final IOVA mode. Even if
   in the parent process it is PA, it doesn't mean it will be so in
   the child process. So test will be skipped when it shouldn't.
2. Because of the above, the same test can pass on a non-IOMMU platform
   if no PCI device is bound to UIO while it would fail if there is a
   PCI device bound to UIO. It seems that the silent assumption is that
   fast-tests should be run without any UIO devices (or basically with
   all buses requestin DC IOVA mode).

Sorry for any confusion with this patchset.