257. 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.

257.1. Running the Application

Set CONFIG_RTE_ETHDEV_RXTX_CALLBACKS=y in config/common_base.

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.

257.2. Test Case:rxtx callbacks

Run the example:

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

waked up::

Core X forwarding packets.

Send one packet from port0,check the received packet on port1. Should receive the packet sent from port0.