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 <ferruh.yigit at intel.com> >> --- >> 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