Re: [dpdk-dev] [PATCH 9/9] doc: add vfio-user library guide
From: Xing, Beilei <hidden>
Date: 2021-01-06 05:07:51
quoted hunk ↗ jump to hunk
-----Original Message----- From: dev <redacted> On Behalf Of Chenbo Xia Sent: Friday, December 18, 2020 3:39 PM To: dev@dpdk.org; thomas@monjalon.net; david.marchand@redhat.com Cc: stephen@networkplumber.org; Liang, Cunming [off-list ref]; Lu, Xiuchun [off-list ref]; Li, Miao [off-list ref]; Wu, Jingjing [off-list ref] Subject: [dpdk-dev] [PATCH 9/9] doc: add vfio-user library guide Add vfio-user library guide and update release notes. Signed-off-by: Chenbo Xia <redacted> Signed-off-by: Xiuchun Lu <redacted> --- doc/guides/prog_guide/index.rst | 1 + doc/guides/prog_guide/vfio_user_lib.rst | 215 ++++++++++++++++++++++++ doc/guides/rel_notes/release_21_02.rst | 11 ++ 3 files changed, 227 insertions(+) create mode 100644 doc/guides/prog_guide/vfio_user_lib.rstdiff --git a/doc/guides/prog_guide/index.rstb/doc/guides/prog_guide/index.rst index 45c7dec88d..f9847b1058 100644--- a/doc/guides/prog_guide/index.rst +++ b/doc/guides/prog_guide/index.rst@@ -70,3 +70,4 @@ Programmer's Guide lto profile_app glossary + vfio_user_libdiff --git a/doc/guides/prog_guide/vfio_user_lib.rstb/doc/guides/prog_guide/vfio_user_lib.rst new file mode 100644 index 0000000000..6daec4d8e5--- /dev/null +++ b/doc/guides/prog_guide/vfio_user_lib.rst@@ -0,0 +1,215 @@ +.. SPDX-License-Identifier: BSD-3-Clause + Copyright(c) 2020 Intel Corporation. +
<snip>
+ +3. Configure the device + +This step includes three APIs in Vfio User. + +* ``rte_vfio_user_dma_map(dev_id, mem, fds, num)`` + + This function maps DMA memory regions for the emulated device. + + ``mem`` specifies the information of DMA memory regions. + + ``fds`` specifies the file descriptors of the DMA memory regions. + + ``num`` specifies the number of the DMA memory regions. + +* ``rte_vfio_user_dma_map(dev_id, mem, num)``
Should be rte_vfio_user_dma_unmap here.
+ + This function unmaps DMA memory regions for the emulated device. + +* ``rte_vfio_user_set_irqs(dev_id, set)`` + + This function configure the interrupts for the emulated device. + + ``set`` specifies the configuration of interrupts. + +After the above three steps are done, users can easily use the emulated +device (e.g., do I/O operations). \ No newline at end of file
<snip>
-- 2.17.1