How to do it...

After the installation, you may test DPDK with the sample applications following the following command:

$ make -C examples RTE_SDK=$(pwd) RTE_TARGET=build O=$(pwd)/build/examples

usertools consists of a few utility bundles written in Python. For example, running cpu_layout.py produces the following output in my computer:

$ cd usertools
$ python cpu_layout.py
===============================================
Core and Socket Information (as reported by '/sys/devices/system/cpu')
===============================================
    
cores =  [0, 1, 2, 3]
sockets =  [0]
    
       Socket 0     
       --------     
Core 0 [0, 1]       
Core 1 [2, 3]       
Core 2 [4, 5]       
Core 3 [6, 7]

This reports the layout of the quad cores of my laptop. You may receive similar output based on your system.

More networking examples or utility tools can be found inside the folder build/examples. More products are built extending or leveraging DPDK. Cisco TRex is a traffic generator developed in C and Python, on top of DPDK. You may configure it locally using the following commands:

$ wget http://trex-tgn.cisco.com/trex/release/latest
$ tar -xvf latest
$ cd v2.27/

Inside the v2.27 folder, you will find the Python scripts to execute TRex based on DPDK. For example, you may start the master daemon using Python as follows:

$ sudo python master_daemon.py start
Master daemon is started
$ sudo python master_daemon.py show
Master daemon is running
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.41.229