From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 506E45963 for ; Tue, 9 Feb 2016 18:51:50 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP; 09 Feb 2016 09:51:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,421,1449561600"; d="scan'208";a="649653669" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by FMSMGA003.fm.intel.com with ESMTP; 09 Feb 2016 09:51:48 -0800 Received: from sivlogin002.ir.intel.com (sivlogin002.ir.intel.com [10.237.217.37]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id u19HplNJ025525; Tue, 9 Feb 2016 17:51:47 GMT Received: from sivlogin002.ir.intel.com (localhost [127.0.0.1]) by sivlogin002.ir.intel.com with ESMTP id u19HplRX020323; Tue, 9 Feb 2016 17:51:47 GMT Received: (from fyigit@localhost) by sivlogin002.ir.intel.com with œ id u19HplKw020319; Tue, 9 Feb 2016 17:51:47 GMT X-Authentication-Warning: sivlogin002.ir.intel.com: fyigit set sender to ferruh.yigit@intel.com using -f Date: Tue, 9 Feb 2016 17:51:47 +0000 From: Ferruh Yigit To: Reshma Pattan Message-ID: <20160209175147.GA19213@sivlogin002.ir.intel.com> Mail-Followup-To: Reshma Pattan , dev@dpdk.org References: <1453912360-18179-1-git-send-email-ferruh.yigit@intel.com> <1453912360-18179-3-git-send-email-ferruh.yigit@intel.com> <56BA2303.3000809@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56BA2303.3000809@intel.com> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: dev@dpdk.org 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:51:50 -0000 On Tue, Feb 09, 2016 at 05:33:55PM +0000, Reshma Pattan wrote: > Hi Ferruh, > Hi Reshma, > 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.? > Right, I will fix, thanks. >> 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? > Doesn't have to have one, KDP does not have a requirement to have right now. It is possible to create PMD with eal --vdev parameter... >> 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. > No, this header used by multiple sources, the function declarations here are the ones in the scope of other file. Thanks, ferruh