From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 03B4F2BC7 for ; Sat, 31 Mar 2018 18:00:23 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Mar 2018 09:00:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,387,1517904000"; d="scan'208";a="216378556" Received: from dpdkx8602.sh.intel.com ([10.67.110.200]) by fmsmga006.fm.intel.com with ESMTP; 31 Mar 2018 09:00:17 -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: Sun, 1 Apr 2018 00:02:59 +0800 Message-Id: <1522512182-182441-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 v4 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: Sat, 31 Mar 2018 16:00:25 -0000 Intel FPGA BUS in DPDK ------------------------- This patch set introduces Intel FPGA BUS support in DPDK. 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 Lib Code Add Intel FPGA BUS Rawdev Driver 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 | 517 ++++++ 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 | 175 ++ drivers/bus/ifpga/rte_bus_ifpga_version.map | 8 + drivers/raw/Makefile | 1 + drivers/raw/ifpga_rawdev/Makefile | 34 + 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 | 594 +++++++ 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, 10526 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