From: "Burakov, Anatoly" <anatoly.burakov@intel.com>
To: David Marchand <david.marchand@redhat.com>
Cc: dev <dev@dpdk.org>, Bruce Richardson <bruce.richardson@intel.com>,
"Ray Kinsella" <mdr@ashroe.eu>,
Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>,
Narcisa Ana Maria Vasile <navasile@linux.microsoft.com>,
Dmitry Malloy <dmitrym@microsoft.com>,
Pallavi Kadam <pallavi.kadam@intel.com>,
Xuan Ding <xuan.ding@intel.com>,
"Yigit, Ferruh" <ferruh.yigit@intel.com>
Subject: Re: [dpdk-dev] [PATCH v1 1/1] vfio: add page-by-page mapping API
Date: Thu, 28 Oct 2021 14:00:28 +0100 [thread overview]
Message-ID: <1f848ee6-0ac7-33db-cb3c-b2876eee6e5c@intel.com> (raw)
In-Reply-To: <CAJFAV8zgi7H6n764_3MKDvgwh81T2sFrW7bLmz+b0x4rJ7zZVw@mail.gmail.com>
On 28-Oct-21 9:18 AM, David Marchand wrote:
> On Wed, Sep 29, 2021 at 12:19 PM Burakov, Anatoly
> <anatoly.burakov@intel.com> wrote:
>>> @@ -2179,7 +2208,29 @@ rte_vfio_container_dma_map(int container_fd, uint64_t vaddr, uint64_t iova,
>>> return -1;
>>> }
>>>
>>> - return container_dma_map(vfio_cfg, vaddr, iova, len);
>>> + /* not having page size means we map entire segment */
>>> + return container_dma_map(vfio_cfg, vaddr, iova, len, 0);
>>> +}
>>> +
>>> +int
>>> +rte_vfio_container_dma_map_paged(int container_fd, uint64_t vaddr,
>>> + uint64_t iova, uint64_t len, uint64_t pagesz)
>>> +{
>>> + struct vfio_config *vfio_cfg;
>>> +
>>> + if (len == 0 || pagesz == 0 || !rte_is_power_of_2(pagesz) ||
>>> + (len % pagesz) != 0) {
>>
>> This should also check if VA/IOVA is page-aligned. Will fix in v2.
>
> Can you send v2?
> Thanks.
>
Yes, working on it :)
--
Thanks,
Anatoly
next prev parent reply other threads:[~2021-10-28 13:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-10 11:27 Anatoly Burakov
2021-09-10 12:31 ` Burakov, Anatoly
2021-09-29 10:18 ` Burakov, Anatoly
2021-10-28 8:18 ` David Marchand
2021-10-28 13:00 ` Burakov, Anatoly [this message]
2021-10-28 14:09 ` [dpdk-dev] [PATCH v2 " Anatoly Burakov
2021-11-02 15:16 ` Burakov, Anatoly
2022-06-02 8:23 ` David Marchand
2023-07-03 23:48 ` Stephen Hemminger
2023-07-04 12:51 ` Burakov, Anatoly
2022-06-02 9:14 ` Ray Kinsella
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=1f848ee6-0ac7-33db-cb3c-b2876eee6e5c@intel.com \
--to=anatoly.burakov@intel.com \
--cc=bruce.richardson@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=dmitry.kozliuk@gmail.com \
--cc=dmitrym@microsoft.com \
--cc=ferruh.yigit@intel.com \
--cc=mdr@ashroe.eu \
--cc=navasile@linux.microsoft.com \
--cc=pallavi.kadam@intel.com \
--cc=xuan.ding@intel.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;
as well as URLs for NNTP newsgroup(s).