13
x FPGA Acceleration and Virtualization Technology in DPDK ROSEN XU TIANFEI ZHANG

FPGA Acceleration and Virtualization Technology in DPDK · 8 Intel FPGA SW Stack OPAE Intro Optimized and simplified hardware and software APIs provided by Intel Consistent cross-platform

  • Upload
    others

  • View
    14

  • Download
    0

Embed Size (px)

Citation preview

Page 1: FPGA Acceleration and Virtualization Technology in DPDK · 8 Intel FPGA SW Stack OPAE Intro Optimized and simplified hardware and software APIs provided by Intel Consistent cross-platform

x

FPGA Acceleration and

Virtualization Technology in

DPDKROSEN XU

TIANFEI ZHANG

Page 2: FPGA Acceleration and Virtualization Technology in DPDK · 8 Intel FPGA SW Stack OPAE Intro Optimized and simplified hardware and software APIs provided by Intel Consistent cross-platform

2

Agenda

► FPGA in Networking Acceleration

► Partial Reconfiguration (PR)

► FPGA Acceleration on DPDK► DPDK High Level Design

► Scan and Probe Work Flow

► Intel FPGA Acceleration Environment

► Intel FPGA Acceleration Stack OPAE Intro

► Intel FPGA Acceleration on DPDK

► Port Representor and Virtualization Scenario

► Status & WIP

► Acknowledgement

Page 3: FPGA Acceleration and Virtualization Technology in DPDK · 8 Intel FPGA SW Stack OPAE Intro Optimized and simplified hardware and software APIs provided by Intel Consistent cross-platform

3

FPGA in Networking Acceleration

Opportunities

– Enhancing Performance: Provide NIC ASIC liked performance

– Changing dynamically: Flexible enough for adding new feature by replace Bit Stream

Problems

– Longer design cycle than software: Compilation, Analysis & Synthesis, Fitter(Place & Router), Assembler, Timing

– Update Bit Stream affecting business: PCIe rescan and driver re-probe

– How to share One FPGA resource with many users

VM VM

vSwitchSlow Path

Acc IP 1

CPU

FPGA Networking Acceleration

Acc IP 2 Acc IP 3

Page 4: FPGA Acceleration and Virtualization Technology in DPDK · 8 Intel FPGA SW Stack OPAE Intro Optimized and simplified hardware and software APIs provided by Intel Consistent cross-platform

4

Partial Reconfiguration (PR)

With Partial Reconfigure(PR) a portion of the FPGA dynamically,

FPGA not only provides one kinds of accelerator but also

provides many types of accelerators at the same time

– All FPGA vendor support PR function

How DPDK fully support FPGA?

– Which type of DPDK Device can provide FPGA PR?

– How can we bind DPDK Driver to FPGA Partial Bit Stream?

VM VM

vSwitchSlow Path

Portion 1(Acc IP 1)

CPU

FPGA Networking Acceleration

Portion 2(Acc IP 2)

Portion 3(Acc IP 3)

Page 5: FPGA Acceleration and Virtualization Technology in DPDK · 8 Intel FPGA SW Stack OPAE Intro Optimized and simplified hardware and software APIs provided by Intel Consistent cross-platform

5

DPDK High Level Design

Crypto AFU Dev

EthAFU Dev

vdev_fpga_cfg driver

IFPGA Bus

FPGARawDev Driver

EthAFU Dev

Crypto AFU Dev

Eth PMDEth PMD

Crypto PMDCrypto PMD

PCI Bus

vdev_fpga_cfg driver vdev_fpga_cfg

driver vdev_fpga_cfg driver

DPDK Framework(APIs)

FPGA AFU

FPGA AFUFPGA AFU

FPGA AFU

PMD

AFU Dev

BUS

VdevCfg

RawDevDriver

FPGA

RawDevOPS

Application(s)

Hot-plugin

Note:• AFU(Accelerated Function Unit): Partial-Bitstream for a portion of the FPGA

FPGA is divided to many portions, each portion has its own

Partial Bit Stream

Vdev Cfg takes configuration for each AFU

IFPGA Bus is a new bus for AFU devices scan and drivers probe

New added AFU Device for each portion’s Acceleration function

All AFUs’ PMD are based on AFU Acceleration

Page 6: FPGA Acceleration and Virtualization Technology in DPDK · 8 Intel FPGA SW Stack OPAE Intro Optimized and simplified hardware and software APIs provided by Intel Consistent cross-platform

6

Scan and Probe Work Flow

afu_listrte_bus_register

constructor

rte_ifpga_driver_register

afu_driver_list

afu_eth

afu_crypto

drv_crypto

drv_eth

INSERT to rte_bus_list

INSERT to afu_driver_list

ifpga pci ixgbmcp_fpga

i40e

pci_device_list

raw_dev_arra

y dev_fpga

……rawdev.ops

ENUMERATE & PRINSERT AFU Device

rte_eal_hotplug_add

PROBE AFU Driver

Ixgb_drv

mcp_drv

I40e_drv

pci_driver_listrte_bus_list

1

2

Rawdev probed as PCI Driver takes FPGA Configuration(Download/PR)

2 scans: FPGA PCI Device Scan(1st Scan) and AFU Scan(2nd Scan)

OPAE Provides Common lib and API for low level FPGA management & accelerator access

Page 7: FPGA Acceleration and Virtualization Technology in DPDK · 8 Intel FPGA SW Stack OPAE Intro Optimized and simplified hardware and software APIs provided by Intel Consistent cross-platform

7

Intel FPGA Acceleration Environment

FPGACPU

User Application& Libraries

CPU

FPGA Interface Manager (FIM)Intel® Acceleration Engine with

OPAE1 Technology

Accelerator Function(Developer created

orprovided by Intel)

UPI2/PCIe*

HSSI3

Accelerator Function Interfaces

Hypervisor & OS

OPAE

FPGA

FPGA Management Engine(FME)

– Provides: power and thermal management, error reporting, partial reconfiguration, performance reporting, and other infrastructure functions.

– Each FPGA has one FME, accessible through the physical function.

Accelerated Function Unit(AFU)

– Implements: one Acceleration, can be partial reconfiguration.

– Each FPGA can support Multiple AFUs.

Page 8: FPGA Acceleration and Virtualization Technology in DPDK · 8 Intel FPGA SW Stack OPAE Intro Optimized and simplified hardware and software APIs provided by Intel Consistent cross-platform

8

Intel FPGA SW Stack OPAE Intro

Optimized and simplified hardware and software APIs

provided by Intel

Consistent cross-platform API

Minimal software overhead and latency

Supports virtual machines and bare metal platforms

Open source code licensing and developer

community

– Intel FPGA drivers being upstreaming to Linux kernel

– Intel FPGA user space drivers have merged into DPDK

https://01.org/sites/default/files/downloads/opae/open-programmable-acceleration-engine-paper.pdf

Page 9: FPGA Acceleration and Virtualization Technology in DPDK · 8 Intel FPGA SW Stack OPAE Intro Optimized and simplified hardware and software APIs provided by Intel Consistent cross-platform

9

Intel FPGA Acceleration on DPDK

FPGA Mgmt

(partial reconfiguration)

Network Path

(NIC)

DPDK Device PMD

DPDK Application

librte_rawdev librte_ethdev

Bare metal Application

VFIO

OPAE Hardware Layer API

Intel fpga base code

Eth driver (AFU)fpga bus

DPDK FPGA Device DriverDPDK PCI

Bus

Custom User space driver

FPGA Accelerator

OPAE High Level APIs

Kernel Space

User Space

crypto

event

DPDK Device PMD– For defined DPDK Device(Ethdev/Cryptodev/Eventdev)

Non-DPDK User-Space Driver– For Customized Device, Transparent DPDK

Rawdev Support PR– Rawdev is submited in 18.02

Note:• DPDK and NON-DPDK mode will not run at the same time

Page 10: FPGA Acceleration and Virtualization Technology in DPDK · 8 Intel FPGA SW Stack OPAE Intro Optimized and simplified hardware and software APIs provided by Intel Consistent cross-platform

10

Port Representor and Virtualization Scenario

Port Representor– Each VF port binging to one representor port

– Control Plan Application take perception of VF port by its representor port

Virtualization– FPGA can support both DPDK APP and Socket APP in VM

– FPGA Rawdev Driver take FPGA configuration

HyperVisor

REPRESENTOR PMD

ETH DEV API

FME

FPGARawdev Driver

PF PMD

PF AFU

ETH DEV API

VF AFUVF AFU

APP Socket

App

BSD Socket Syscall

REPRESENTOR PMD

ETH DEV API

REPRESENTOR PMD

ETH DEV API

REPRESENTOR PMD

ETH DEV API

Control Plan Application

FPGA Networking Acceleration

VF AFUVF AFU

Host OS Kernel

VM VM

Page 11: FPGA Acceleration and Virtualization Technology in DPDK · 8 Intel FPGA SW Stack OPAE Intro Optimized and simplified hardware and software APIs provided by Intel Consistent cross-platform

11

Status & Working in Progress

2017’Q3 OPAE 0.9 Release [DONE]– Fully support Intel FPGA Acceleration Environment

– Support FIM 6.3.0

2018’Q1 OPAE 0.13 Release, [DONE]– Support FIM 6.4.0

2018’Q2 OPAE 1.0 Release [DONE]

2018’Q1 DPDK with OPAE User Space Driver PoC [DONE]

2018’Q1 IFPGA Bus RFC patch [DONE]

2018’Q2 IFPGA Bus patch set upstream to DPDK 18.05 [DONE]

DPDK supports FPGA Acceleration is ready.

Welcome on board!

Page 12: FPGA Acceleration and Virtualization Technology in DPDK · 8 Intel FPGA SW Stack OPAE Intro Optimized and simplified hardware and software APIs provided by Intel Consistent cross-platform

12

Acknowledgement

Song Liu

Zhang Zhang

Hao Wu

Yilun Xu

Heqing Zhu

Cunming Liang

Helin Zhang

Zhihong Wang

Yanglong Wu

Jingjing Wu

Qi Zhang

Yuwei Zhang

Declan Doherty

Bruce Richardson

Ferruh Yigit

Roy Fan Zhang

Page 13: FPGA Acceleration and Virtualization Technology in DPDK · 8 Intel FPGA SW Stack OPAE Intro Optimized and simplified hardware and software APIs provided by Intel Consistent cross-platform

Thanks !