117. Sample Application Tests: RX/TX Callbacks

The RX/TX Callbacks sample application is a packet forwarding application that demonstrates the use of user defined callbacks on received and transmitted packets. The application performs a simple latency check, using callbacks, to determine the time packets spend within the application.

In the sample application a user defined callback is applied to all received packets to add a timestamp. A separate callback is applied to all packets prior to transmission to calculate the elapsed time, in CPU cycles.

117.1. Running the Application

Open common_base and set CONFIG_RTE_ETHDEV_RXTX_CALLBACKS=y.

To run the example in a linuxapp environment:

./build/rxtx_callbacks -c 2 -n 4

Refer to DPDK Getting Started Guide for general information on running applications and the Environment Abstraction Layer (EAL) options.

117.2. test_rxtx_callbacks

Running:

./examples/rxtx_callbacks/build/rxtx_callbacks -c 2 -n 4

waked up::

Core X forwarding packets.

Send one packet on Port0,check the port1 receive packet. It receive one packet that the port0 send.