SlideShare a Scribd company logo
LEADING
COLLABORATION
IN THE ARM
ECOSYSTEM
Mediated devices for ethernet
LEADING COLLABORATION
IN THE ARM ECOSYSTEM
Device IO vs Device Driver
UIO/VFIO -> userland device driver
VFIO_MDEV -> userlande device IO
● Introduced in kernel 4.10.
● Currently supported by Intel i915/QEMU to support virtual GPUs.
● Offers iommu isolation using VFIO-API.
Many use cases
● WrapDrive from Huawei for accelerators (crypto…)
● net_mdev further specialized WrapDrive for net_devices
○ To be used by DPDK, ODP, VPP, Netmap, specialized stacks (TSN)
● block_mdev for SPDK…?
LEADING COLLABORATION
IN THE ARM ECOSYSTEM
Design goals & roles
Design goals
● Userland shall not be able to highjack kernel
○ Same attack surface as VFIO
● Bus agnostic (PCI, DPAA2, platform…)
● Userland packet framework agnostic
○ VPP packet to index
Userland
● packet memory (buffers or areas) and HW descriptors
● Leverages netlink and other control channels
Kernel driver
● control of device initialization, reset, rings…
LEADING COLLABORATION
IN THE ARM ECOSYSTEM
net-mdev overall architecture
net-mdev
ulib
DPDK/ODP/VPP/...
Userspace
Kernel
Doorbell MMIO(PCI BAR)
Rx Descriptor Ring
Tx Descriptor RingDevice
Driver
netlink…
vfio-mdev
LEADING COLLABORATION
IN THE ARM ECOSYSTEM
Reality check
Code impact
● Realtek kernel driver: 10KLOCs
● PoC sending/receiving packets from userland
○ r8169/e1000e userspace-“driver”(descriptor handling/mmio): ~100 lines
○ r8169/e1000e full ODP integration: ~ 500 lines
○ Userland ODP framework: 620 lines
○ Kernel framework(r8169/e1000e): 227 and 239 lines respectively
○ r8169 driver changes: less than 80 lines
○ e100e driver changes: less than 50 lines
Mediated device framework to be completed
Subtle security issues solved
LEADING COLLABORATION
IN THE ARM ECOSYSTEM
IOMMU/SMMU and VFIO refresher (memory)
IOMMU groups: internal
IOMMU domains: API
“Domains”: DMAR or process or VM or...
can contain multiple IOMMU groups
VFIO container
IOMMU paging
granularity
MMU
IOMMU (Intel)
SMMU (ARM)
kmalloc: FFFFFF80021000000
Physical: 20000000000
IOVA: FC00000
userland : 1000000000
LEADING COLLABORATION
IN THE ARM ECOSYSTEM
Solving problems
Finalize vfio-mdev for IOMMU
● Currently deals only with remapping and device emulation
● Single IOVA for all groups to allow packet forwarding
● Streaming DMA handling
Subpage PCI mapping for “door bell” and other stuff
● Problem appears with N ports = 1 PCI device and only p<N captured ports
○ Cannot allow PCI mapping: IOCTL or CPU innovation required
Dealing with rings setup
● Complex activity, page aligned boundaries (MMU & IOMMU)
● Need to be domain IOVA, not group IOVA
LEADING COLLABORATION
IN THE ARM ECOSYSTEM
Plan
Complete understanding of problem space
● More complete framework (statistics - TUN/TAP value?)
● Have DPDK PMD, ODP driver, VPP driver
Who wants to collaborate?
Summarize in RFC for upstream and get guidance
Linaro Board Confidential
CORE
level
CLUB
level
GROUP
level
96BOARDS
COMMUNITY

More Related Content

PDF
LF_DPDK17_Implementation and Testing of Soft Patch Panel
PDF
LF_DPDK17_Abstract APIs for DPDK and ODP
PDF
DPDK Support for New HW Offloads
PDF
LF_DPDK_DPDK as microservices in ZTE Paas
PDF
LF_DPDK17_DPDK with KNI – Pushing the Performance of an SDWAN Gateway to High...
PDF
TRex Traffic Generator - Hanoch Haim
PDF
LF_DPDK17_Event Adapters - Connecting Devices to Eventdev
PDF
DPDK Integration: A Product's Journey - Roger B. Melton
LF_DPDK17_Implementation and Testing of Soft Patch Panel
LF_DPDK17_Abstract APIs for DPDK and ODP
DPDK Support for New HW Offloads
LF_DPDK_DPDK as microservices in ZTE Paas
LF_DPDK17_DPDK with KNI – Pushing the Performance of an SDWAN Gateway to High...
TRex Traffic Generator - Hanoch Haim
LF_DPDK17_Event Adapters - Connecting Devices to Eventdev
DPDK Integration: A Product's Journey - Roger B. Melton

What's hot (20)

PDF
LF_DPDK_Mellanox bifurcated driver model
PPTX
Disaggregation a Primer: Optimizing design for Edge Cloud & Bare Metal applic...
PDF
Hotplug and Virtio - Tetsuya Mukawa
PDF
LF_DPDK17_rte_raw_device: implementing programmable accelerators using generi...
PDF
FD.io - The Universal Dataplane
PDF
Generic Resource Manager - László Vadkerti, András Kovács
PDF
OCP U.S. Summit 2017 Presentation
PDF
The Power of SmartNICs
PDF
LF_DPDK17_Accelerating P4-based Dataplane with DPDK
PDF
Performance challenges in software networking
PDF
Linux Native, HTTP Aware Network Security
PDF
DPDK Summit 2015 - HP - Al Sanders
PPTX
Netsft2017 day in_life_of_nfv
PPTX
6WIND - SPEED MATTERS: The Challenge 2014 Contest Winners
PDF
Install FD.IO VPP On Intel(r) Architecture & Test with Trex*
PDF
DPDK Summit 2015 - RIFT.io - Tim Mortsolf
PDF
Accelerate Service Function Chaining Vertical Solution with DPDK
PDF
Hyperscan - Mohammad Abdul Awal
PDF
DPACC Acceleration Progress and Demonstration
PDF
ODSA Use Case - SmartNIC
LF_DPDK_Mellanox bifurcated driver model
Disaggregation a Primer: Optimizing design for Edge Cloud & Bare Metal applic...
Hotplug and Virtio - Tetsuya Mukawa
LF_DPDK17_rte_raw_device: implementing programmable accelerators using generi...
FD.io - The Universal Dataplane
Generic Resource Manager - László Vadkerti, András Kovács
OCP U.S. Summit 2017 Presentation
The Power of SmartNICs
LF_DPDK17_Accelerating P4-based Dataplane with DPDK
Performance challenges in software networking
Linux Native, HTTP Aware Network Security
DPDK Summit 2015 - HP - Al Sanders
Netsft2017 day in_life_of_nfv
6WIND - SPEED MATTERS: The Challenge 2014 Contest Winners
Install FD.IO VPP On Intel(r) Architecture & Test with Trex*
DPDK Summit 2015 - RIFT.io - Tim Mortsolf
Accelerate Service Function Chaining Vertical Solution with DPDK
Hyperscan - Mohammad Abdul Awal
DPACC Acceleration Progress and Demonstration
ODSA Use Case - SmartNIC
Ad

Similar to LF_DPDK17_mediated devices: better userland IO (20)

PDF
HKG18-110 - net_mdev: Fast path user space I/O
ODP
Enduro/X Middleware
PDF
RISC-V 30908 patra
PDF
XPDDS17: Keynote: Shared Coprocessor Framework on ARM - Oleksandr Andrushchen...
PDF
SBC6020 SAM9G20 based Single Board Computer
PDF
KVM-22-Supporting TEE on x86 client platforms with pKVM_2.pdf
PDF
XS Boston 2008 Self IO Emulation
PDF
Introduction to FPGA, VHDL
PDF
Introduction to Advanced embedded systems course
PPT
UNIT-III ES.ppt
PPTX
Chapter_2_ESD_Typical Embedded System.pptx
PPT
Visão geral do hardware do servidor System z e Linux on z - Concurso Mainframe
PPTX
Intro to micro controller (Atmega16)
PDF
openPOWERLINK over Xenomai
PDF
SystemReady IR and MediaTek Genio-1200-EVK - Tech part - COSCUP 20240804
PDF
Programable logic controller.pdf
PDF
Introduction to FreeRTOS
 
PDF
HKG18-116 - RAS Solutions for Arm64 Servers
PDF
ARM Processor Tutorial
PDF
The_New_IBM_z15_A-technical_review_of_the_Processor_Design_New_Features_IO_Ca...
HKG18-110 - net_mdev: Fast path user space I/O
Enduro/X Middleware
RISC-V 30908 patra
XPDDS17: Keynote: Shared Coprocessor Framework on ARM - Oleksandr Andrushchen...
SBC6020 SAM9G20 based Single Board Computer
KVM-22-Supporting TEE on x86 client platforms with pKVM_2.pdf
XS Boston 2008 Self IO Emulation
Introduction to FPGA, VHDL
Introduction to Advanced embedded systems course
UNIT-III ES.ppt
Chapter_2_ESD_Typical Embedded System.pptx
Visão geral do hardware do servidor System z e Linux on z - Concurso Mainframe
Intro to micro controller (Atmega16)
openPOWERLINK over Xenomai
SystemReady IR and MediaTek Genio-1200-EVK - Tech part - COSCUP 20240804
Programable logic controller.pdf
Introduction to FreeRTOS
 
HKG18-116 - RAS Solutions for Arm64 Servers
ARM Processor Tutorial
The_New_IBM_z15_A-technical_review_of_the_Processor_Design_New_Features_IO_Ca...
Ad

More from LF_DPDK (20)

PDF
LF_DPDK17_Integrating and using DPDK with Open vSwitch
PDF
LF_DPDK17_ OpenVswitch hardware offload over DPDK
PDF
LF_DPDK17_DPDK support for new hardware offloads
PDF
LF_DPDK17_DPDK's best kept secret – Micro-benchmark performance tests
PDF
LF_DPDK17_Lagopus Router
PDF
LF_DPDK17_DPDK Membership Library
PDF
LF_DPDK17_Accelerating NFV with VMware's Enhanced Network Stack (ENS) and Int...
PDF
LF_DPDK17_testpmd: swissknife for NFV
PDF
LF_DPDK17_Make DPDK's software traffic manager a deployable solution for vBNG
PDF
LF_DPDK17_OpenNetVM: A high-performance NFV platforms to meet future communic...
PDF
LF_DPDK17_DPDK on Microsoft Azure
PDF
LF_DPDK17_VPP Host Stack
PDF
LF_DPDK17_Accelerating Packet Processing with FPGA NICs
PDF
LF_DPDK17_rte_security: enhancing IPSEC offload
PDF
LF_DPDK17_Enabling hardware acceleration in DPDK data plane applications
PDF
LF_DPDK17_Serverless DPDK - How SmartNIC resident DPDK Accelerates Packet Pro...
PDF
LF_DPDK17_Flexible and Extensible support for new protocol processing with DP...
PDF
LF_DPDK17_Technical Roadmap
PDF
LF_DPDK17_Enhanced Memory Management
PDF
LF_DPDK17_SafetyOrange - a tiny server class multi-purpose box with DPDK
LF_DPDK17_Integrating and using DPDK with Open vSwitch
LF_DPDK17_ OpenVswitch hardware offload over DPDK
LF_DPDK17_DPDK support for new hardware offloads
LF_DPDK17_DPDK's best kept secret – Micro-benchmark performance tests
LF_DPDK17_Lagopus Router
LF_DPDK17_DPDK Membership Library
LF_DPDK17_Accelerating NFV with VMware's Enhanced Network Stack (ENS) and Int...
LF_DPDK17_testpmd: swissknife for NFV
LF_DPDK17_Make DPDK's software traffic manager a deployable solution for vBNG
LF_DPDK17_OpenNetVM: A high-performance NFV platforms to meet future communic...
LF_DPDK17_DPDK on Microsoft Azure
LF_DPDK17_VPP Host Stack
LF_DPDK17_Accelerating Packet Processing with FPGA NICs
LF_DPDK17_rte_security: enhancing IPSEC offload
LF_DPDK17_Enabling hardware acceleration in DPDK data plane applications
LF_DPDK17_Serverless DPDK - How SmartNIC resident DPDK Accelerates Packet Pro...
LF_DPDK17_Flexible and Extensible support for new protocol processing with DP...
LF_DPDK17_Technical Roadmap
LF_DPDK17_Enhanced Memory Management
LF_DPDK17_SafetyOrange - a tiny server class multi-purpose box with DPDK

Recently uploaded (20)

PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPT
Teaching material agriculture food technology
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Electronic commerce courselecture one. Pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
A Presentation on Artificial Intelligence
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Modernizing your data center with Dell and AMD
PPTX
Cloud computing and distributed systems.
PDF
Machine learning based COVID-19 study performance prediction
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
cuic standard and advanced reporting.pdf
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
CIFDAQ's Market Insight: SEC Turns Pro Crypto
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Teaching material agriculture food technology
Network Security Unit 5.pdf for BCA BBA.
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Electronic commerce courselecture one. Pdf
20250228 LYD VKU AI Blended-Learning.pptx
A Presentation on Artificial Intelligence
The Rise and Fall of 3GPP – Time for a Sabbatical?
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Modernizing your data center with Dell and AMD
Cloud computing and distributed systems.
Machine learning based COVID-19 study performance prediction
The AUB Centre for AI in Media Proposal.docx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
cuic standard and advanced reporting.pdf
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...

LF_DPDK17_mediated devices: better userland IO

  • 2. LEADING COLLABORATION IN THE ARM ECOSYSTEM Device IO vs Device Driver UIO/VFIO -> userland device driver VFIO_MDEV -> userlande device IO ● Introduced in kernel 4.10. ● Currently supported by Intel i915/QEMU to support virtual GPUs. ● Offers iommu isolation using VFIO-API. Many use cases ● WrapDrive from Huawei for accelerators (crypto…) ● net_mdev further specialized WrapDrive for net_devices ○ To be used by DPDK, ODP, VPP, Netmap, specialized stacks (TSN) ● block_mdev for SPDK…?
  • 3. LEADING COLLABORATION IN THE ARM ECOSYSTEM Design goals & roles Design goals ● Userland shall not be able to highjack kernel ○ Same attack surface as VFIO ● Bus agnostic (PCI, DPAA2, platform…) ● Userland packet framework agnostic ○ VPP packet to index Userland ● packet memory (buffers or areas) and HW descriptors ● Leverages netlink and other control channels Kernel driver ● control of device initialization, reset, rings…
  • 4. LEADING COLLABORATION IN THE ARM ECOSYSTEM net-mdev overall architecture net-mdev ulib DPDK/ODP/VPP/... Userspace Kernel Doorbell MMIO(PCI BAR) Rx Descriptor Ring Tx Descriptor RingDevice Driver netlink… vfio-mdev
  • 5. LEADING COLLABORATION IN THE ARM ECOSYSTEM Reality check Code impact ● Realtek kernel driver: 10KLOCs ● PoC sending/receiving packets from userland ○ r8169/e1000e userspace-“driver”(descriptor handling/mmio): ~100 lines ○ r8169/e1000e full ODP integration: ~ 500 lines ○ Userland ODP framework: 620 lines ○ Kernel framework(r8169/e1000e): 227 and 239 lines respectively ○ r8169 driver changes: less than 80 lines ○ e100e driver changes: less than 50 lines Mediated device framework to be completed Subtle security issues solved
  • 6. LEADING COLLABORATION IN THE ARM ECOSYSTEM IOMMU/SMMU and VFIO refresher (memory) IOMMU groups: internal IOMMU domains: API “Domains”: DMAR or process or VM or... can contain multiple IOMMU groups VFIO container IOMMU paging granularity MMU IOMMU (Intel) SMMU (ARM) kmalloc: FFFFFF80021000000 Physical: 20000000000 IOVA: FC00000 userland : 1000000000
  • 7. LEADING COLLABORATION IN THE ARM ECOSYSTEM Solving problems Finalize vfio-mdev for IOMMU ● Currently deals only with remapping and device emulation ● Single IOVA for all groups to allow packet forwarding ● Streaming DMA handling Subpage PCI mapping for “door bell” and other stuff ● Problem appears with N ports = 1 PCI device and only p<N captured ports ○ Cannot allow PCI mapping: IOCTL or CPU innovation required Dealing with rings setup ● Complex activity, page aligned boundaries (MMU & IOMMU) ● Need to be domain IOVA, not group IOVA
  • 8. LEADING COLLABORATION IN THE ARM ECOSYSTEM Plan Complete understanding of problem space ● More complete framework (statistics - TUN/TAP value?) ● Have DPDK PMD, ODP driver, VPP driver Who wants to collaborate? Summarize in RFC for upstream and get guidance