From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 001D91E35 for ; Wed, 28 Mar 2018 11:27:13 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Mar 2018 02:27:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,370,1517904000"; d="scan'208";a="211971835" Received: from dpdkx8602.sh.intel.com ([10.67.110.200]) by orsmga005.jf.intel.com with ESMTP; 28 Mar 2018 02:27:10 -0700 From: Rosen Xu To: dev@dpdk.org Cc: declan.doherty@intel.com, bruce.richardson@intel.com, shreyansh.jain@nxp.com, tianfei.zhang@intel.com, hao.wu@intel.com, gaetan.rivet@6wind.com Date: Wed, 28 Mar 2018 17:29:50 +0800 Message-Id: <1522229396-17898-1-git-send-email-rosen.xu@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1521553556-62982-1-git-send-email-rosen.xu@intel.com> References: <1521553556-62982-1-git-send-email-rosen.xu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=y Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 0/6] Introduce Intel FPGA BUS 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: Wed, 28 Mar 2018 09:27:14 -0000 Intel FPGA BUS in DPDK ------------------------- This patch set introduces Intel FPGA BUS support in DPDK. v3 updates: =========== - Remove all modifications of bus scan and probe - FPGA BUS Scan is trigged by hotplug of Rawdev - Took Modifications of comments - Move AFU Device to IFPGA - FPGA BUS Scan depend on it¡¯s IFPGA Rawdev - Add Build Macros for FPGA BUS and IFPGA Rawdev Questions ========= Why not PCI Bus? All of the AFUs of one FPGA may share same PCI BDF. Why not vdev Bus? Because AFUs depend on Rawdev, and it's hardware specpic. Motivation ========== FPGA is used more and more widely in Cloud and NFV, one primary reason is that FPGA not only provide ASIC performance but also it's more flexible than ASIC. FPGA use Partial Reconfigure(PR) Parts of Bitstream to achieve its flexibility. Another reason is that one FPGA can be shared by different Users, and each User can use some of AFUs of One FPGA. That means One FPGA Device Bitstream is divided into many Parts of Bitstream(each Part of Bitstream is defined as AFU-Accelerated Function Unit), and each AFU is a Hardware Acceleration Unit and it can dynamically Reload respectively. Proposed Solution ================= - Involve Rawdev to take FPGA Partial Configuration(Download/PR) - Defined FPGA-BUS for Acceleration Drivers of AFUs - FPGA PCI Scan(1st Scan) follows DPDK UIO/VFIO PCI Scan Process, probe Intel FPGA Rawdev Driver. FPGA-BUS scan is called, but AFU depend on Rawdev, so this scan doesn't trig AFU device create. - AFU Scan(2nd Scan) bind DPDK Driver to FPGA Partial-Bitstream. This scan is trigged by hotplug of IFPGA Rawdev probe, in this scan the AFUs will be created and their dirves are also probed. Scope ===== The Intel FPGA BUS implementation is target towards various FPGA Devices use PR to provide many Acceleration Function. Specific PMDs may also bind to its AFU. And Applications don't care they are using ASIC Acceleration or FPGA AFU Acceleration. Status ===== With integrating Intel PSG FPGA Software Stack OPAE(Open Programmable Acceleration Engine) Share Code, Intel FPGA BUS runs well in Intel PSG FPGA Cards. Rosen Xu (6): Add Intel FPGA BUS Command Parse Code config/common_base: Add Intel FPGA Build Configuration Macro mk/rte.app.mk: Add Intel FPGA Bus Build Configuration Macro To App Script drivers/bus: Add Intel FPGA Bus Lib Code drivers/raw/ifpga_rawdev: Add Intel FPGA Rawdev Driver Code drivers/raw/ifpga_rawdev: Add Intel FPGA OPAE Share Code config/common_base | 6 + drivers/bus/Makefile | 1 + drivers/bus/ifpga/Makefile | 33 + drivers/bus/ifpga/ifpga_bus.c | 562 +++++++ drivers/bus/ifpga/ifpga_common.c | 141 ++ drivers/bus/ifpga/ifpga_common.h | 22 + drivers/bus/ifpga/ifpga_logs.h | 31 + drivers/bus/ifpga/rte_bus_ifpga.h | 140 ++ drivers/bus/ifpga/rte_bus_ifpga_version.map | 8 + drivers/raw/Makefile | 1 + drivers/raw/ifpga_rawdev/Makefile | 35 + drivers/raw/ifpga_rawdev/base/Makefile | 54 + drivers/raw/ifpga_rawdev/base/ifpga_api.c | 543 +++++++ drivers/raw/ifpga_rawdev/base/ifpga_api.h | 77 + drivers/raw/ifpga_rawdev/base/ifpga_compat.h | 84 + drivers/raw/ifpga_rawdev/base/ifpga_defines.h | 1696 ++++++++++++++++++++ drivers/raw/ifpga_rawdev/base/ifpga_enumerate.c | 861 ++++++++++ drivers/raw/ifpga_rawdev/base/ifpga_enumerate.h | 38 + drivers/raw/ifpga_rawdev/base/ifpga_feature_dev.c | 340 ++++ drivers/raw/ifpga_rawdev/base/ifpga_feature_dev.h | 197 +++ drivers/raw/ifpga_rawdev/base/ifpga_fme.c | 763 +++++++++ drivers/raw/ifpga_rawdev/base/ifpga_fme_dperf.c | 328 ++++ drivers/raw/ifpga_rawdev/base/ifpga_fme_error.c | 430 +++++ drivers/raw/ifpga_rawdev/base/ifpga_fme_iperf.c | 742 +++++++++ drivers/raw/ifpga_rawdev/base/ifpga_fme_pr.c | 395 +++++ drivers/raw/ifpga_rawdev/base/ifpga_hw.h | 154 ++ drivers/raw/ifpga_rawdev/base/ifpga_port.c | 735 +++++++++ drivers/raw/ifpga_rawdev/base/ifpga_port_error.c | 236 +++ drivers/raw/ifpga_rawdev/base/opae_debug.c | 126 ++ drivers/raw/ifpga_rawdev/base/opae_debug.h | 46 + drivers/raw/ifpga_rawdev/base/opae_hw_api.c | 389 +++++ drivers/raw/ifpga_rawdev/base/opae_hw_api.h | 276 ++++ drivers/raw/ifpga_rawdev/base/opae_ifpga_hw_api.c | 173 ++ drivers/raw/ifpga_rawdev/base/opae_ifpga_hw_api.h | 306 ++++ drivers/raw/ifpga_rawdev/base/opae_osdep.h | 111 ++ .../ifpga_rawdev/base/osdep_raw/osdep_generic.h | 104 ++ .../ifpga_rawdev/base/osdep_rte/osdep_generic.h | 72 + drivers/raw/ifpga_rawdev/ifpga_rawdev.c | 492 ++++++ drivers/raw/ifpga_rawdev/ifpga_rawdev.h | 37 + drivers/raw/ifpga_rawdev/ifpga_rawdev_example.c | 98 ++ .../raw/ifpga_rawdev/rte_ifpga_rawdev_version.map | 4 + lib/librte_eal/common/eal_common_options.c | 8 +- lib/librte_eal/common/eal_options.h | 2 + mk/rte.app.mk | 3 + 44 files changed, 10899 insertions(+), 1 deletion(-) create mode 100644 drivers/bus/ifpga/Makefile create mode 100644 drivers/bus/ifpga/ifpga_bus.c create mode 100644 drivers/bus/ifpga/ifpga_common.c create mode 100644 drivers/bus/ifpga/ifpga_common.h create mode 100644 drivers/bus/ifpga/ifpga_logs.h create mode 100644 drivers/bus/ifpga/rte_bus_ifpga.h create mode 100644 drivers/bus/ifpga/rte_bus_ifpga_version.map create mode 100644 drivers/raw/ifpga_rawdev/Makefile create mode 100644 drivers/raw/ifpga_rawdev/base/Makefile create mode 100644 drivers/raw/ifpga_rawdev/base/ifpga_api.c create mode 100644 drivers/raw/ifpga_rawdev/base/ifpga_api.h create mode 100644 drivers/raw/ifpga_rawdev/base/ifpga_compat.h create mode 100644 drivers/raw/ifpga_rawdev/base/ifpga_defines.h create mode 100644 drivers/raw/ifpga_rawdev/base/ifpga_enumerate.c create mode 100644 drivers/raw/ifpga_rawdev/base/ifpga_enumerate.h create mode 100644 drivers/raw/ifpga_rawdev/base/ifpga_feature_dev.c create mode 100644 drivers/raw/ifpga_rawdev/base/ifpga_feature_dev.h create mode 100644 drivers/raw/ifpga_rawdev/base/ifpga_fme.c create mode 100644 drivers/raw/ifpga_rawdev/base/ifpga_fme_dperf.c create mode 100644 drivers/raw/ifpga_rawdev/base/ifpga_fme_error.c create mode 100644 drivers/raw/ifpga_rawdev/base/ifpga_fme_iperf.c create mode 100644 drivers/raw/ifpga_rawdev/base/ifpga_fme_pr.c create mode 100644 drivers/raw/ifpga_rawdev/base/ifpga_hw.h create mode 100644 drivers/raw/ifpga_rawdev/base/ifpga_port.c create mode 100644 drivers/raw/ifpga_rawdev/base/ifpga_port_error.c create mode 100644 drivers/raw/ifpga_rawdev/base/opae_debug.c create mode 100644 drivers/raw/ifpga_rawdev/base/opae_debug.h create mode 100644 drivers/raw/ifpga_rawdev/base/opae_hw_api.c create mode 100644 drivers/raw/ifpga_rawdev/base/opae_hw_api.h create mode 100644 drivers/raw/ifpga_rawdev/base/opae_ifpga_hw_api.c create mode 100644 drivers/raw/ifpga_rawdev/base/opae_ifpga_hw_api.h create mode 100644 drivers/raw/ifpga_rawdev/base/opae_osdep.h create mode 100644 drivers/raw/ifpga_rawdev/base/osdep_raw/osdep_generic.h create mode 100644 drivers/raw/ifpga_rawdev/base/osdep_rte/osdep_generic.h create mode 100644 drivers/raw/ifpga_rawdev/ifpga_rawdev.c create mode 100644 drivers/raw/ifpga_rawdev/ifpga_rawdev.h create mode 100644 drivers/raw/ifpga_rawdev/ifpga_rawdev_example.c create mode 100644 drivers/raw/ifpga_rawdev/rte_ifpga_rawdev_version.map -- 1.8.3.1