DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Anatoly Burakov <anatoly.burakov@intel.com>
Cc: dev@dpdk.org, Bruce Richardson <bruce.richardson@intel.com>,
	shahafs@mellanox.com, hemant.agrawal@nxp.com,
	gaetan.rivet@6wind.com
Subject: Re: [dpdk-dev] [PATCH] eal/vfio: export all VFIO functions when not compiling VFIO
Date: Mon, 16 Apr 2018 13:55:35 +0200	[thread overview]
Message-ID: <2776485.EdHvyZj5u1@xps> (raw)
In-Reply-To: <b5e952a1b034a9f614225a506431f808ee4fb5b7.1523875496.git.anatoly.burakov@intel.com>

16/04/2018 12:59, Anatoly Burakov:
> --- a/lib/librte_eal/common/include/rte_vfio.h
> +++ b/lib/librte_eal/common/include/rte_vfio.h
> @@ -33,10 +33,6 @@
>  #define VFIO_NOIOMMU_MODE      \
>  	"/sys/module/vfio/parameters/enable_unsafe_noiommu_mode"
>  
> -#ifdef __cplusplus
> -extern "C" {
> -#endif
> -
>  /* NOIOMMU is defined from kernel version 4.5 onwards */
>  #ifdef VFIO_NOIOMMU_IOMMU
>  #define RTE_VFIO_NOIOMMU VFIO_NOIOMMU_IOMMU
> @@ -44,6 +40,17 @@ extern "C" {
>  #define RTE_VFIO_NOIOMMU 8
>  #endif
>  
> +#else /* not VFIO_PRESENT */
> +
> +/* we don't need an actual definition, only pointer is used */
> +struct vfio_device_info;
> +
> +#endif /* VFIO_PRESENT */
> +
> +#ifdef __cplusplus
> +extern "C" {
> +#endif

Why moving this extern "C"?
Could it be at the top of the file?

[...]
> +int __rte_experimental
> +rte_vfio_get_group_fd(__rte_unused int iommu_group_num)
> +{
> +	return -1;
> +}
> +
>  #endif

This #endif needs a comment.

  reply	other threads:[~2018-04-16 11:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-16 10:59 Anatoly Burakov
2018-04-16 11:55 ` Thomas Monjalon [this message]
2018-04-16 12:05   ` Burakov, Anatoly
2018-04-16 12:13 ` [dpdk-dev] [PATCH v2] " Anatoly Burakov
2018-04-16 17:27   ` Thomas Monjalon

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=2776485.EdHvyZj5u1@xps \
    --to=thomas@monjalon.net \
    --cc=anatoly.burakov@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=gaetan.rivet@6wind.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=shahafs@mellanox.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).