From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id A57F21BB8B for ; Wed, 4 Apr 2018 08:49:04 +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 orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Apr 2018 23:49:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,405,1517904000"; d="scan'208";a="213779499" Received: from dpdkx8602.sh.intel.com ([10.67.110.200]) by orsmga005.jf.intel.com with ESMTP; 03 Apr 2018 23:49:01 -0700 From: Rosen Xu To: dev@dpdk.org Cc: declan.doherty@intel.com, bruce.richardson@intel.com, shreyansh.jain@nxp.com, ferruh.yigit@intel.com, konstantin.ananyev@intel.com, tianfei.zhang@intel.com, hao.wu@intel.com, gaetan.rivet@6wind.com Date: Wed, 4 Apr 2018 14:51:14 +0800 Message-Id: <1522824677-86958-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 v5 0/3] 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, 04 Apr 2018 06:49:05 -0000 Intel FPGA BUS in DPDK ------------------------- This patch set introduces Intel FPGA BUS support in DPDK. v5 updates: =========== - Fixed SHARED LIB Build issue - Changed command name to IFPGA Rawdev name, so remove pci library datastruct and function. - Fixed PATCH v2/v3/v4 comments v4 updates: =========== - Remove all modifications from eal - Create vdev to take IFPGA parameters configuration - AFU Device Driver bind to AFU Device by uuid - Take more test in scenario of Multi-FPGA System 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 (3): Add Intel FPGA BUS Library Add Intel FPGA BUS Rawdev Driver Add Intel FPGA OPAE Share Code config/common_base | 6 + drivers/bus/Makefile | 1 + drivers/bus/ifpga/Makefile | 32 + drivers/bus/ifpga/ifpga_bus.c | 504 ++++++ drivers/bus/ifpga/ifpga_common.c | 88 + drivers/bus/ifpga/ifpga_common.h | 18 + drivers/bus/ifpga/ifpga_logs.h | 31 + drivers/bus/ifpga/rte_bus_ifpga.h | 168 ++ drivers/bus/ifpga/rte_bus_ifpga_version.map | 10 + drivers/raw/Makefile | 1 + drivers/raw/ifpga_rawdev/Makefile | 36 + drivers/raw/ifpga_rawdev/base/Makefile | 54 + drivers/raw/ifpga_rawdev/base/ifpga_api.c | 529 ++++++ drivers/raw/ifpga_rawdev/base/ifpga_api.h | 73 + drivers/raw/ifpga_rawdev/base/ifpga_compat.h | 84 + drivers/raw/ifpga_rawdev/base/ifpga_defines.h | 1688 ++++++++++++++++++++ drivers/raw/ifpga_rawdev/base/ifpga_enumerate.c | 851 ++++++++++ drivers/raw/ifpga_rawdev/base/ifpga_enumerate.h | 38 + drivers/raw/ifpga_rawdev/base/ifpga_feature_dev.c | 341 ++++ drivers/raw/ifpga_rawdev/base/ifpga_feature_dev.h | 191 +++ drivers/raw/ifpga_rawdev/base/ifpga_fme.c | 761 +++++++++ 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 | 399 +++++ drivers/raw/ifpga_rawdev/base/ifpga_hw.h | 154 ++ drivers/raw/ifpga_rawdev/base/ifpga_port.c | 435 +++++ drivers/raw/ifpga_rawdev/base/ifpga_port_error.c | 192 +++ 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 | 408 +++++ drivers/raw/ifpga_rawdev/base/opae_hw_api.h | 280 ++++ drivers/raw/ifpga_rawdev/base/opae_ifpga_hw_api.c | 172 ++ drivers/raw/ifpga_rawdev/base/opae_ifpga_hw_api.h | 306 ++++ drivers/raw/ifpga_rawdev/base/opae_osdep.h | 115 ++ .../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 | 592 +++++++ drivers/raw/ifpga_rawdev/ifpga_rawdev.h | 37 + .../raw/ifpga_rawdev/rte_ifpga_rawdev_version.map | 4 + mk/rte.app.mk | 3 + 41 files changed, 10450 insertions(+) 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/rte_ifpga_rawdev_version.map -- 1.8.3.1