DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: dev <dev@dpdk.org>, Hemant Agrawal <hemant.agrawal@nxp.com>,
	 Sachin Saxena <sachin.saxena@oss.nxp.com>,
	Rosen Xu <rosen.xu@intel.com>,
	 Stephen Hemminger <sthemmin@microsoft.com>,
	Long Li <longli@microsoft.com>,
	 Jay Zhou <jianjay.zhou@huawei.com>,
	Gaetan Rivet <grive@u256.net>, Matan Azrad <matan@nvidia.com>,
	 Shahaf Shuler <shahafs@nvidia.com>,
	Tianfei zhang <tianfei.zhang@intel.com>,
	 Radha Mohan Chintakuntla <radhac@marvell.com>,
	Veerasenareddy Burru <vburru@marvell.com>,
	 Anatoly Burakov <anatoly.burakov@intel.com>,
	Nicolas Chautru <nicolas.chautru@intel.com>,
	 Ferruh Yigit <ferruh.yigit@intel.com>,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
	 Maxime Coquelin <maxime.coquelin@redhat.com>,
	Chenbo Xia <chenbo.xia@intel.com>
Subject: Re: [dpdk-dev] [PATCH] eal: remove useless bus API includes
Date: Fri, 16 Apr 2021 09:22:45 +0200	[thread overview]
Message-ID: <CAJFAV8wNDWSMUBo7JLZc6DgU3psa-VS6qmkyOZ5r4p5Z9uE3LA@mail.gmail.com> (raw)
In-Reply-To: <20210414174338.657891-1-thomas@monjalon.net>

On Wed, Apr 14, 2021 at 7:45 PM Thomas Monjalon <thomas@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	other threads:[~2021-04-16  7:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-14 17:43 Thomas Monjalon
2021-04-16  7:22 ` David Marchand [this message]

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=CAJFAV8wNDWSMUBo7JLZc6DgU3psa-VS6qmkyOZ5r4p5Z9uE3LA@mail.gmail.com \
    --to=david.marchand@redhat.com \
    --cc=anatoly.burakov@intel.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=chenbo.xia@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=grive@u256.net \
    --cc=hemant.agrawal@nxp.com \
    --cc=jianjay.zhou@huawei.com \
    --cc=longli@microsoft.com \
    --cc=matan@nvidia.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=nicolas.chautru@intel.com \
    --cc=radhac@marvell.com \
    --cc=rosen.xu@intel.com \
    --cc=sachin.saxena@oss.nxp.com \
    --cc=shahafs@nvidia.com \
    --cc=sthemmin@microsoft.com \
    --cc=thomas@monjalon.net \
    --cc=tianfei.zhang@intel.com \
    --cc=vburru@marvell.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).