[PATCH 1/2] doc: announce region based device mapping support

Xia, Chenbo chenbo.xia at intel.com
Thu Jul 7 14:39:14 CEST 2022


Hi Sunil,

> -----Original Message-----
> From: skori at marvell.com <skori at marvell.com>
> Sent: Tuesday, June 28, 2022 9:54 PM
> To: Ray Kinsella <mdr at ashroe.eu>
> Cc: dev at dpdk.org; Sunil Kumar Kori <skori at marvell.com>
> Subject: [PATCH 1/2] doc: announce region based device mapping support
> 
> From: Sunil Kumar Kori <skori at marvell.com>
> 
> Adding region based device mapping support, which enables pci device
> to map only required memory region instead of mapping full BAR.

Why there will be such requirement to mmap only part of BAR when the BAR
can be fully mmapped. I thought you want to enable something like sparse
mmap feature in VFIO, but seems it's a feature that let driver ask for
specific mmap option. Could you explain the use case here?

Thanks,
Chenbo

> 
> Signed-off-by: Sunil Kumar Kori <skori at marvell.com>
> ---
>  doc/guides/rel_notes/deprecation.rst | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/doc/guides/rel_notes/deprecation.rst
> b/doc/guides/rel_notes/deprecation.rst
> index 4e5b23c53d..8800a3eb41 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -125,3 +125,16 @@ Deprecation Notices
>    applications should be updated to use the ``dmadev`` library instead,
>    with the underlying HW-functionality being provided by the ``ioat`` or
>    ``idxd`` dma drivers
> +
> +* pci: Update ``rte_pci_device`` and ``rte_pci_driver`` to add region
> based
> +  memory mapping support. There could be a requirement to mmap specific
> memory
> +  region only. Using this mechanism, pci device can be mapped for
> +  a given BAR at a given offset of given size.
> +
> +  ``rte_pci_device`` will be added with following field
> +  ``regions[PCI_MAX_RESOURCE][PCI_MAX_REGION_PER_RESOURCE];``. This field
> will
> +  specify the regions which are mapped for a given BAR.
> +
> +  ``rte_pci_driver`` will be added with ``rte_pci_region_map *regions``
> and
> +  ``valid_bars[PCI_MAX_RESOURCE]``. Using these fields, driver can
> propagate
> +  its region information which are required to be mmap.
> --
> 2.25.1



More information about the dev mailing list