From mboxrd@z Thu Jan 1 00:00:00 1970 From: Reshma Pattan Subject: Re: [PATCH 2/2] kdp: add virtual PMD for kernel slow data path communication Date: Tue, 9 Feb 2016 17:33:55 +0000 Message-ID: <56BA2303.3000809@intel.com> References: <1453912360-18179-1-git-send-email-ferruh.yigit@intel.com> <1453912360-18179-3-git-send-email-ferruh.yigit@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit To: Ferruh Yigit , dev@dpdk.org Return-path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 65E541396 for ; Tue, 9 Feb 2016 18:33:57 +0100 (CET) In-Reply-To: <1453912360-18179-3-git-send-email-ferruh.yigit@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Ferruh, On 1/27/2016 4:32 PM, Ferruh Yigit wrote: > 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 > --- > > diff --git a/doc/guides/nics/pcap_ring.rst b/doc/guides/nics/pcap_ring.rst > index 46aa3ac..78b7b61 100644 > --- a/doc/guides/nics/pcap_ring.rst > +++ b/doc/guides/nics/pcap_ring.rst > @@ -28,11 +28,11 @@ > + > + > +DPDK application can be used to forward packages between these interfaces: > + Packages ==> packets.? > diff --git a/drivers/net/kdp/rte_eth_kdp.c b/drivers/net/kdp/rte_eth_kdp.c > new file mode 100644 > index 0000000..ac650d7 > --- /dev/null > +++ b/drivers/net/kdp/rte_eth_kdp.c > @@ -0,0 +1,481 @@ > No public API to create KDP PMD device. We should have one right? > diff --git a/drivers/net/kdp/rte_kdp.h b/drivers/net/kdp/rte_kdp.h > new file mode 100644 > index 0000000..b9db048 > --- /dev/null > +++ b/drivers/net/kdp/rte_kdp.h > @@ -0,0 +1,126 @@ > > +struct rte_kdp_tap *rte_kdp_tap_init(uint16_t port_id); > +struct rte_kdp *rte_kdp_init(uint16_t port_id); > + > +int rte_kdp_start(struct rte_kdp *kdp, struct rte_mempool *pktmbuf_pool, > + const struct rte_kdp_conf *conf); > + > +unsigned rte_kdp_rx_burst(struct rte_kdp *kdp, > + struct rte_mbuf **mbufs, unsigned num); > + > +unsigned rte_kdp_tx_burst(struct rte_kdp *kdp, > + struct rte_mbuf **mbufs, unsigned num); > + > +int rte_kdp_release(struct rte_kdp *kdp); > + > +void rte_kdp_close(void); > These functions can be static. Thanks, Reshma