From: Thomas Monjalon <thomas@monjalon.net>
To: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Cc: dev@dpdk.org, stable@dpdk.org,
Tal Shnaiderman <talshn@nvidia.com>,
Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>,
Narcisa Ana Maria Vasile <navasile@linux.microsoft.com>,
Dmitry Malloy <dmitrym@microsoft.com>,
"Kadam, Pallavi" <pallavi.kadam@intel.com>
Subject: Re: [dpdk-dev] [PATCH] eal/windows: fix IOVA mode detection and handling
Date: Mon, 25 Oct 2021 21:00:55 +0200 [thread overview]
Message-ID: <2802061.CXJFZ6z2yU@thomas> (raw)
In-Reply-To: <3ed65ecf-d530-59e9-b18e-6dedddaa5328@intel.com>
> > Windows EAL did not detect IOVA mode and worked incorrectly
> > if physical addresses could not be obtained
> > (if virt2phys driver was missing or inaccessible).
> > In this case, rte_mem_virt2iova() reported RTE_BAD_IOVA for any address.
> > Inability to obtain IOVA, be it PA or VA, should cause a failure
> > for the DPDK allocator, but it was hidden by the implementation,
> > so allocations did not fail when they should.
> > The mode when DPDK cannot obtain PA but can work is IOVA-as-VA mode.
> > However, rte_eal_iova_mode() always returned RTE_IOVA_DC
> > (while it should only ever return RTE_IOVA_PA or RTE_IOVA_VA),
> > because IOVA mode detection was not implemented.
> >
> > Implement IOVA mode detection:
> > 1. Always allow to force --iova-mode=va.
> > 2. Allow to force --iova-mode=pa only if virt2phys is available.
> > 3. If no mode is forced and virt2phys is available,
> > select the mode according to bus requests, default to PA.
> > 4. If no mode is forced but virt2phys is unavailable, default to VA.
> > Fix rte_mem_virt2iova() by returning VA when using IOVA-as-VA.
> > Fix rte_eal_iova_mode() by returning the selected mode.
> >
> > Fixes: 2a5d547a4a9b ("eal/windows: implement basic memory management")
> > Cc: stable@dpdk.org
> >
> > Reported-by: Tal Shnaiderman <talshn@nvidia.com>
> > Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
>
> Tested-by: Pallavi Kadam <pallavi.kadam@intel.com>
> Acked-by: Pallavi Kadam <pallavi.kadam@intel.com>
Applied, thanks.
prev parent reply other threads:[~2021-10-25 19:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-25 12:20 [dpdk-dev] [PATCH] eal/windows: fix IOVA mode detection and handling Dmitry Kozlyuk
2021-10-25 18:22 ` Kadam, Pallavi
2021-10-25 19:00 ` Thomas Monjalon [this message]
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=2802061.CXJFZ6z2yU@thomas \
--to=thomas@monjalon.net \
--cc=dev@dpdk.org \
--cc=dkozlyuk@nvidia.com \
--cc=dmitry.kozliuk@gmail.com \
--cc=dmitrym@microsoft.com \
--cc=navasile@linux.microsoft.com \
--cc=pallavi.kadam@intel.com \
--cc=stable@dpdk.org \
--cc=talshn@nvidia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.