[dpdk-dev] [PATCH] eal/vfio: export internal vfio functions
Hemant Agrawal
hemant.agrawal at nxp.com
Tue Apr 3 10:34:11 CEST 2018
On 4/3/2018 1:04 PM, Thomas Monjalon wrote:
>>>> +/**
>>>> + * Parse IOMMU group number for a device
>>>> + *
>>>> + * This function is only relevant to linux and will return
>>>> + * an error on BSD.
>>>> + *
>>>> + * @return
>>>> + * 1 on success
>>>> + * 0 for non-existent group
>>>> + * <0 for errors
>>>> + */
>>>> +int __rte_experimental
>>>> +rte_vfio_get_group_no(const char *sysfs_base,
>>>> + const char *dev_addr, int *iommu_group_no);
>>>> +
>>>> +/**
>>>> + * Open VFIO container fd or get an existing one
>>>> + *
>>>> + * This function is only relevant to linux and will return
>>>> + * an error on BSD.
>>>> + *
>>>> + * @return
>>>> + * > 0 container fd
>>>> + * < 0 for errors
>>>> + */
>>>> +int __rte_experimental
>>>> +rte_vfio_get_container_fd(void);
>>>> +
>>>> +/**
>>>> + * Open VFIO group fd or get an existing one
>>>> + *
>>>> + * This function is only relevant to linux and will return
>>>> + * an error on BSD.
>>>> + *
>>>> + * @return
>>>> + * > 0 group fd
>>>> + * < 0 for errors
>>>> + */
>>>> +int __rte_experimental
>>>> +rte_vfio_get_group_fd(int iommu_group_no);
>>>
>>> All these new functions should have some @param documentation.
>>
>> added the @param
>>
>>> This file is not included in doxygen, probably because @file is missing.
>>
>> most of these functions are internal functions. do you think we should
>> add it in doxygen as well?
>
> I think yes. It is an exported header of EAL.
> The @file is missing to make it visible in doxygen.
done.
>
>>> About the naming, are you sure about "group_no" instead of "group_num"?
>>
>> Agree, but this is already in many places. I feel this change will be
>> unnecessary.
>
> I don't see any other function using "_no".
> What about naming the function "rte_vfio_get_group_no"
> as "rte_vfio_get_group_num"?
>
>
done
>
More information about the dev
mailing list