DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Burakov, Anatoly" <anatoly.burakov@intel.com>
To: Thomas Monjalon <thomas@monjalon.net>
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:05:51 +0100	[thread overview]
Message-ID: <c4b13feb-fce9-ce42-3018-94c77121732f@intel.com> (raw)
In-Reply-To: <2776485.EdHvyZj5u1@xps>

On 16-Apr-18 12:55 PM, Thomas Monjalon wrote:
> 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?

As it was, it was inside #ifdef VFIO_PRESENT. It can be at the top, or 
it can be where it is in this patch, not much difference.

> 
> [...]
>> +int __rte_experimental
>> +rte_vfio_get_group_fd(__rte_unused int iommu_group_num)
>> +{
>> +	return -1;
>> +}
>> +
>>   #endif
> 
> This #endif needs a comment.
> 
Will do.


-- 
Thanks,
Anatoly

  reply	other threads:[~2018-04-16 12:05 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
2018-04-16 12:05   ` Burakov, Anatoly [this message]
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=c4b13feb-fce9-ce42-3018-94c77121732f@intel.com \
    --to=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 \
    --cc=thomas@monjalon.net \
    /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).