DPDK KNI interface
Quick overview
High Level Architecture
User space
Kernel space
NIC
App DPDK
Ring
buffers
KNI driver
RX/TX
queues
TCP/IP
stack
Kernel space
Data RX path design
TCP/IP
stack
User space
App DPDK lib
FIFO
Thread
Thread
N
Data RX path implementation
Kernel space
netif_rx(skb)
TCP/IP
stack
kni_fifo_put()
Kernel module
FIFO
DPDK libSocket
kni_net_rx
kni_fifo_get
dev_alloc_skb
rte_kni_tx_burst()
Kernel space
Data TX path
TCP/IP
stack
User space
App DPDK lib
FIFO
Data TX path implementation
Kernel space
kni_net_tx()
TCP/IP
stack
kni_fifo_get()
Kernel module
memcpy (FIFO, SKB)
kni_fifo_put
dev_kfree_skb
FIFO
DPDK libSocket
rte_kni_rx_burst()
Kernel space
Sample application in a loopback mode
User space
FIFO 2
NIC
port1 port2
Core2Core1
FIFO 1
Thread
Sample application in a standard mode
Kernel space
User space
FIFO 2
NIC
port1 port2
Core2Core1
FIFO 1
vEth1vEth0
Thread
ipstack
References
Building the Development Kit Binary
DPDK Programmer’s Guide - Kernel NIC Interface
Kernel NIC Interface Sample Application
Getting Started Guide for Linux
DPDK quick start
Huge pages
My blog
Learning Network Programming

DPDK KNI interface

  • 1.
  • 2.
    High Level Architecture Userspace Kernel space NIC App DPDK Ring buffers KNI driver RX/TX queues TCP/IP stack
  • 3.
    Kernel space Data RXpath design TCP/IP stack User space App DPDK lib FIFO Thread Thread N
  • 4.
    Data RX pathimplementation Kernel space netif_rx(skb) TCP/IP stack kni_fifo_put() Kernel module FIFO DPDK libSocket kni_net_rx kni_fifo_get dev_alloc_skb rte_kni_tx_burst()
  • 5.
    Kernel space Data TXpath TCP/IP stack User space App DPDK lib FIFO
  • 6.
    Data TX pathimplementation Kernel space kni_net_tx() TCP/IP stack kni_fifo_get() Kernel module memcpy (FIFO, SKB) kni_fifo_put dev_kfree_skb FIFO DPDK libSocket rte_kni_rx_burst()
  • 7.
    Kernel space Sample applicationin a loopback mode User space FIFO 2 NIC port1 port2 Core2Core1 FIFO 1 Thread
  • 8.
    Sample application ina standard mode Kernel space User space FIFO 2 NIC port1 port2 Core2Core1 FIFO 1 vEth1vEth0 Thread ipstack
  • 9.
    References Building the DevelopmentKit Binary DPDK Programmer’s Guide - Kernel NIC Interface Kernel NIC Interface Sample Application Getting Started Guide for Linux DPDK quick start Huge pages
  • 10.