From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP; 09 Feb 2016 09:33:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,421,1449561600"; d="scan'208";a="649646633" Received: from reshmapa-mobl.ger.corp.intel.com (HELO [10.237.220.61]) ([10.237.220.61]) by FMSMGA003.fm.intel.com with ESMTP; 09 Feb 2016 09:33:55 -0800 To: Ferruh Yigit , dev@dpdk.org References: <1453912360-18179-1-git-send-email-ferruh.yigit@intel.com> <1453912360-18179-3-git-send-email-ferruh.yigit@intel.com> From: Reshma Pattan Message-ID: <56BA2303.3000809@intel.com> Date: Tue, 9 Feb 2016 17:33:55 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <1453912360-18179-3-git-send-email-ferruh.yigit@intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 2/2] kdp: add virtual PMD for kernel slow data path communication X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Feb 2016 17:33:57 -0000 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