[dpdk-dev] [PATCH 2/2] kdp: add virtual PMD for kernel slow data path communication

Xu, Qian Q qian.q.xu at intel.com
Thu Jan 28 09:16:09 CET 2016


Any dependencies with kernel versions? What kernel versions should it support? 

Thanks
Qian

-----Original Message-----
From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Ferruh Yigit
Sent: Thursday, January 28, 2016 12:33 AM
To: dev at dpdk.org
Subject: [dpdk-dev] [PATCH 2/2] kdp: add virtual PMD for kernel slow data path communication

This patch provides slow data path communication to the Linux kernel.
Patch is based on librte_kni, and heavily re-uses it.

The main difference is librte_kni library converted into a PMD, to provide ease of use for applications.

Now any application can use slow path communication without any update in application, because of existing eal support for virtual PMD.

Also this PMD supports two methods to send packets to the Linux, first one is custom FIFO implementation with help of KDP kernel module, second one is Linux in-kernel tun/tap support. PMD first checks for KDP kernel module, if fails it tries to create and use a tap interface.

With FIFO method: PMD's rx_pkt_burst() get packets from FIFO, and tx_pkt_burst() puts packet to the FIFO.
The corresponding Linux virtual network device driver code also gets/puts packets from FIFO as they are coming from hardware.

With tun/tap method: no external kernel module required, PMD reads from and writes packets to the tap interface file descriptor. Tap interface has performance penalty against FIFO implementation.

Signed-off-by: Ferruh Yigit <ferruh.yigit at intel.com>
---
 config/common_linuxapp                  |   1 +
 doc/guides/nics/pcap_ring.rst           | 125 ++++++++-
 doc/guides/rel_notes/release_2_3.rst    |   6 +
 drivers/net/Makefile                    |   3 +-
 drivers/net/kdp/Makefile                |  61 ++++
 drivers/net/kdp/rte_eth_kdp.c           | 481 ++++++++++++++++++++++++++++++++
 drivers/net/kdp/rte_kdp.c               | 365 ++++++++++++++++++++++++
 drivers/net/kdp/rte_kdp.h               | 126 +++++++++
 drivers/net/kdp/rte_kdp_fifo.h          |  91 ++++++
 drivers/net/kdp/rte_kdp_tap.c           |  96 +++++++
 drivers/net/kdp/rte_pmd_kdp_version.map |   4 +
 lib/librte_eal/common/include/rte_log.h |   3 +-
 mk/rte.app.mk                           |   3 +-
 13 files changed, 1359 insertions(+), 6 deletions(-)  create mode 100644 drivers/net/kdp/Makefile  create mode 100644 drivers/net/kdp/rte_eth_kdp.c  create mode 100644 drivers/net/kdp/rte_kdp.c  create mode 100644 drivers/net/kdp/rte_kdp.h  create mode 100644 drivers/net/kdp/rte_kdp_fifo.h  create mode 100644 drivers/net/kdp/rte_kdp_tap.c  create mode 100644 drivers/net/kdp/rte_pmd_kdp_version.map


More information about the dev mailing list