From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 201F2A09E4; Thu, 21 Jan 2021 17:30:15 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 08BB9140D1B; Thu, 21 Jan 2021 17:30:15 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 80B07140D0A; Thu, 21 Jan 2021 17:30:13 +0100 (CET) IronPort-SDR: 76AD5CKHc4yjjNGybC9c3592ur3Y62Yrbq1I6v2CV41cS0PrXEOd8/pU8XKjOrmFziM5CxqQ3c y8nBi1Q6Whuw== X-IronPort-AV: E=McAfee;i="6000,8403,9871"; a="176723761" X-IronPort-AV: E=Sophos;i="5.79,364,1602572400"; d="scan'208";a="176723761" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jan 2021 08:30:12 -0800 IronPort-SDR: COoajytyhb2maILVeXIeDbpPK3fitabPsD9mE36MDDdFGxJItGKkVsOGEA61Zl8VzLsThjCTAD iJTDOPDA8kdA== X-IronPort-AV: E=Sophos;i="5.79,364,1602572400"; d="scan'208";a="385368084" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.196.87]) ([10.213.196.87]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jan 2021 08:30:09 -0800 To: Wei Huang , dev@dpdk.org, rosen.xu@intel.com, qi.z.zhang@intel.com Cc: stable@dpdk.org, tianfei.zhang@intel.com, Ray Kinsella References: <1611209014-4031-1-git-send-email-wei.huang@intel.com> <1611209014-4031-4-git-send-email-wei.huang@intel.com> From: Ferruh Yigit Message-ID: Date: Thu, 21 Jan 2021 16:30:08 +0000 MIME-Version: 1.0 In-Reply-To: <1611209014-4031-4-git-send-email-wei.huang@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v11 3/4] raw/ifpga: add OPAE API for OpenStack Cyborg X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list 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 1/21/2021 6:03 AM, Wei Huang wrote: > Cyborg is an OpenStack project that aims to provide a general purpose > management framework for acceleration resources (i.e. various types > of accelerators such as GPU, FPGA, NP, ODP, DPDK/SPDK and so on). > It needs some OPAE type APIs to manage PACs (Programmable Acceleration > Card) with Intel FPGA. Below major functions are added to meets > Cyborg requirements. > 1. opae_init() set up OPAE environment. > 2. opae_cleanup() clean up OPAE environment. > 3. opae_enumerate() searches PAC with specific FPGA. > 4. opae_get_property() gets properties of FPGA. > 5. opae_partial_reconfigure() perform partial configuration on FPGA. > 6. opae_get_image_info() gets information of image file. > 7. opae_update_flash() updates FPGA flash with specific image file. > 8. opae_cancel_flash_update() cancel process of FPGA flash update. > 9. opae_probe_device() manually probe specific FPGA with ifpga driver. > 10. opae_remove_device() manually remove specific FPGA from ifpga driver. > 11. opae_bind_driver() binds specific FPGA with specified kernel driver. > 12. opae_unbind_driver() unbinds specific FPGA from kernel driver. > 13. opae_reboot_device() reboots specific FPGA (do reconfiguration). > Hi Wei, As far as I understand you are adding above public functions which are on top of raw/ifpga driver functions, so they are like PMD specific APIs, I think there are a few problems with it: 1) Do we really need/want this much PMD specific API? Can't we have them through the rawdev abstraction layer? 2) DPDK public APIs are part of API/ABI policy, so there are a few rules they have to follow, like: - They should start with 'rte_' prefix, and the PMD specific APIs should start with 'rte_pmd_' prefix - They should be in the .map file - They should be experimental at least one release - They should be fully documented in a doxygen format - Header file should be added to index file for API documentation Please don't update above before 1) is clearified and we are sure new APIs are required. <...> > @@ -13,8 +13,10 @@ objs = [base_objs] > deps += ['ethdev', 'rawdev', 'pci', 'bus_pci', 'kvargs', > 'bus_vdev', 'bus_ifpga', 'net', 'net_i40e', 'net_ipn3ke'] > > -sources = files('ifpga_rawdev.c') > +sources = files('ifpga_rawdev.c', 'ifpga_opae_api.c') > > includes += include_directories('base') > includes += include_directories('../../net/ipn3ke') > includes += include_directories('../../net/i40e') > + > +install_headers('ifpga_opae_api.h') > There is a 'headers' helper that you can use for meson. Also the header file name should start with 'rte_pmd_'. Even before this patch, isn't application has to include the rawdev PMD header? Why that header was not installed?