On Wed, Apr 14, 2021 at 7:45 PM Thomas Monjalon <tho...@monjalon.net> wrote:
>
> The file rte_bus.h was included in too many files.
>
> The enum rte_iova_mode is moved from rte_bus.h to rte_eal.h
> because it is not specific to the bus layer.
> It allows to clean-up more includes of rte_bus.h.
>
> Some indirect includes had to be added in few files to compensate.

mingw compilation is broken.
windows/eal.c needs rte_bus.h.


> diff --git a/lib/librte_eal/include/rte_bus.h 
> b/lib/librte_eal/include/rte_bus.h
> index ebacc7adc3..f59a025955 100644
> --- a/lib/librte_eal/include/rte_bus.h
> +++ b/lib/librte_eal/include/rte_bus.h
> @@ -28,20 +28,6 @@ extern "C" {
>  TAILQ_HEAD(rte_bus_list, rte_bus);
>
>
> -/**
> - * IOVA mapping mode.
> - *
> - * IOVA mapping mode is iommu programming mode of a device.
> - * That device (for example: IOMMU backed DMA device) based
> - * on rte_iova_mode will generate physical or virtual address.
> - *
> - */
> -enum rte_iova_mode {
> -       RTE_IOVA_DC = 0,        /* Don't care mode */
> -       RTE_IOVA_PA = (1 << 0), /* DMA using physical address */
> -       RTE_IOVA_VA = (1 << 1)  /* DMA using virtual address */
> -};
> -


Since you move rte_iova_mode to eal.h, but rte_bus.h still uses this
enum, I would expect a #include <rte_eal.h> earlier in this same file.

check_includes does not catch this, so there is a path that leads to
rte_eal.h inclusion, but I prefer an explicit include.


>  /**
>   * Bus specific scan for devices attached on the bus.
>   * For each bus object, the scan would be responsible for finding devices and


-- 
David Marchand

Reply via email to