> -----Original Message-----
> From: dev <dev-boun...@dpdk.org> On Behalf Of Chenbo Xia
> Sent: Friday, December 18, 2020 3:39 PM
> To: dev@dpdk.org; tho...@monjalon.net; david.march...@redhat.com
> Cc: step...@networkplumber.org; Liang, Cunming
> <cunming.li...@intel.com>; Lu, Xiuchun <xiuchun...@intel.com>; Li, Miao
> <miao...@intel.com>; Wu, Jingjing <jingjing...@intel.com>
> 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 <chenbo....@intel.com>
> Signed-off-by: Xiuchun Lu <xiuchun...@intel.com>
> ---
> 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.rst
>
> diff --git a/doc/guides/prog_guide/index.rst
> b/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_lib
> diff --git a/doc/guides/prog_guide/vfio_user_lib.rst
> b/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