From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hemant Agrawal Subject: Re: [PATCH] eal/vfio: export internal vfio functions Date: Tue, 3 Apr 2018 14:04:11 +0530 Message-ID: <9a0f8bbd-9308-a150-63b1-c5057fdccbcd@nxp.com> References: <1521014434-3399-1-git-send-email-hemant.agrawal@nxp.com> <1882630.IHjtNmfOsM@xps> <61905017-5c93-87f7-032d-e0b1907f56c0@nxp.com> <8959415.YrdPqVfVHk@xps> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, bruce.richardson@intel.com, anatoly.burakov@intel.comm, xiao.w.wang@intel.com, junjie.j.chen@intel.com To: Thomas Monjalon , Hemant Agrawal Return-path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0082.outbound.protection.outlook.com [104.47.0.82]) by dpdk.org (Postfix) with ESMTP id A8982AAEC for ; Tue, 3 Apr 2018 10:34:26 +0200 (CEST) In-Reply-To: <8959415.YrdPqVfVHk@xps> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 >