From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=1ehspJraavc/rEp1xJBDB/N6iUA9ueQRH5C12r0mBmo=; b=vFPGFNu6Fe8hKSnr71MixG4FcYv0GOmpxhRs8pIrIyOz70oLIKY47sQR4HfCyEhDIXRu6/SwrUzBevMtQ5KN9GTkeeHgbGi88TXZMDX2xbm2Ay52aVOjTSTDkoQwuzoWMUhvZoIOOXAPyoIQ8xBuB7VxPcbKnwHNxPvoCtohbFQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; Received: from [10.232.133.65] (14.142.187.166) by DB3PR04MB0762.eurprd04.prod.outlook.com (2a01:111:e400:9440::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.631.10; Tue, 3 Apr 2018 08:34:23 +0000 To: Thomas Monjalon , Hemant Agrawal Cc: dev@dpdk.org, bruce.richardson@intel.com, anatoly.burakov@intel.comm, xiao.w.wang@intel.com, junjie.j.chen@intel.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> From: Hemant Agrawal Message-ID: <9a0f8bbd-9308-a150-63b1-c5057fdccbcd@nxp.com> Date: Tue, 3 Apr 2018 14:04:11 +0530 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <8959415.YrdPqVfVHk@xps> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: PN1PR0101CA0047.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:c::33) To DB3PR04MB0762.eurprd04.prod.outlook.com (2a01:111:e400:9440::25) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 4e2793c5-402b-4e45-5b88-08d5993db4a4 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:DB3PR04MB0762; X-Microsoft-Exchange-Diagnostics: 1; DB3PR04MB0762; 3:Y0vqNqlvHWvK4ANBvaIVIyUX+ZNpKLKyMWfHu8ZLDzTkUD2b/qyGJ9gTKzbxDGJ5iHW3IeHgTnQAKglxLdBa5VLIqRAO1mIhcjYlNwMiVHBvQbxyfUw5LCyjmOb8bIREfU+Vv+GaExKR40EYJlFQyTOUK3jfpnVE/Rm2QJ4YXPxx2eSIcuORg54v6Zp56QUnMgtm1+HQc4tq8m2DtmrT9pNHace1R2WPBupXJjd2jDFxcLdnRRu0L9+/EYX9dwgE; 25:MUaGXkHQujAF1Yn3YB8iuKM1FCg4u3KBoyzTJunLfFKklwC66CX7pzzuP1rwZviCx2pNTH09Pn9cqyFI9JfoBYHJhFZCTVeHuuK77nx4ipwJXNdLTzUHDpoV49HFUTS7KDeguc+DClhALkgd/xLDvF6E/4h8Kj2tCHu7PFDBFERUm+Dx6SxDLVUH9qHGLGwmS+xC0yNsK4berL6pT8iQY6SsrVHeLr16BkNDoLzT/XJkgKbEP1FYy/XVhM1Dn52pHzp2ZPLj1ImwtifBxQJUIEQ0In9XMkpu2C9EaEU+7BO9Ku5gpfwEUO3uOAhK+2B5aa5xjPfaal8NJEz2L8IIeg==; 31:ERyeYO/oISTcR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H8JGTj3cMTZK/TLrZQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93001095)(3231221)(944501327)(52105095)(6055026)(6041310)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:DB3PR04MB0762; BCL:0; PCL:0; RULEID:; SRVR:DB3PR04MB0762; X-Forefront-PRVS: 0631F0BC3D X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6049001)(376002)(396003)(346002)(366004)(39380400002)(39860400002)(189003)(199004)(53936002)(25786009)(229853002)(81166006)(26005)(76176011)(6666003)(486005)(31696002)(67846002)(476003)(81156014)(486005)(7736002)(6246003)(97736004)(105586002)(86362001)(31686004)(52146003)(6486002)(77096007)(53546011)(386003)(446003)(16526019)(16576012)(65956001)(3846002)(8936002)(11346002)(52116002)(68736007)(8676002)(65806001)(106356001)(66066001)(47776003)(23676004)(2486003)(5660300001)(956004)(316002)(93886005)(110136005)(186003)(478600001)(50466002)(305945005)(65826007)(2616005)(2906002)(55236004)(4326008)(5009440100003)(58126008)(230700001)(36756003)(6116002)(64126003)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR04MB0762; H:[10.232.133.65]; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtEQjNQUjA0TUIwNzYyOzIzOlgwdlI2SEZBMWJDU1JvNkd5bE5nb0Zza0RI?= =?utf-8?B?MFppNFp5czB5Z2hUTGV2UkFOQTZvdEhVYzZ2Tys4b090aDV6Uk9pUmc2cGt6?= =?utf-8?B?UG5XeGpoM21aMGEvdUVTcDIvdHllbGFTNnhGVE9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wwZpebcmuUZU6JwgiQxfDP5qSIzAVz6o=; 24:AtafCM32d5RSsdFK7EUjt9yEfYiU2EDhmRzLRHDt6hsjzmVe3bLt9LRTRetlBHL2/8Fbi1cIcpJ0qAyEBgsBp2Jfa1wp2qhH7cR1POejfD4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB3PR04MB0762; 7:48EjZKCmPM79QJt3wGgRm8yFnKf25xdGFZtCW+qHdjnREYkoAjLmUSBuuEvmDrRLjumcrUeC/gBBUE61fwnMJ/UFpIykVQQVFOufKJ41PstJUYGAbVf4LWRJZFwQWekwjuKByj66QIi6Fl6ug5B3PE7RbBSzuPCItFMTTuAfaseMGdJofflVl6jxMVpCa55mgsbxOk4zLZ0r1RLH+xAF4TEtSahyL8QCti01ZtNcYRMOhX7qbh7T+hQfHYqXvusr X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Apr 2018 08:34:23.0830 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4e2793c5-402b-4e45-5b88-08d5993db4a4 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR04MB0762 Subject: Re: [dpdk-dev] [PATCH] eal/vfio: export internal vfio functions X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Apr 2018 08:34:27 -0000 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 >