From mboxrd@z Thu Jan 1 00:00:00 1970 From: Remy Horton Subject: Re: Client Server Application using DPDK API Date: Wed, 09 Mar 2016 16:44:10 +0000 Message-ID: <56E052DA.8000901@intel.com> References: <488FF59D9020184C9DCF4B4A0DA4781425535B44@NDA-HCLT-MBS03.hclt.corp.hcl.in> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: Vivek Gupta Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 750D64A63 for ; Wed, 9 Mar 2016 17:44:37 +0100 (CET) In-Reply-To: <488FF59D9020184C9DCF4B4A0DA4781425535B44@NDA-HCLT-MBS03.hclt.corp.hcl.in> 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" 'noon, On 09/03/2016 08:45, Vivek Gupta wrote: > Hi > > I want to write a Client Server application using DPDK API on a > single machine. What are the basic building block for that. How can > we write such application? examples/l2fwd/main.c and examples/ethtool/ethtool-app/main.c are probably the easier examples to follow. In terms of function calls, it is pretty much: rte_eal_init(..); for (each port) { rte_pktmbuf_pool_create(..); rte_eth_dev_configure(..); rte_eth_dev_rx_queue_setup(..); rte_eth_dev_tx_queue_setup(..); rte_eth_dev_start(..); } while(1) { rte_eth_rx_burst(..); /* incoming frames */ rte_eth_tx_burst(..); /* outgoing frames */ } Bear in mind that DPDK deals with MAC frames rather than higher level IP packets, which may be an issue if you intend to use TCP/IP based application protocols. > ::DISCLAIMER:: Avoid using confidentality disclaimers on mailing list emails. It tends to "annoy" people.. :) Regards, ..Remy