'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