The C sources for the anytest DPDK application live under src/, with public
headers in include/. main.c holds the application's main(): it
initializes EAL, the NIC port and mbuf pool, aligns the NIC clock with the CPU TSC,
handshakes with peers, and dispatches to one of the experiment modes (SENDER / RECEIVER /
ROCE / RECEIVER_CUSTOM_SEQ / RP_EXP_CAPABILITY_TEST). common.h
defines the shared globals, roles (NP / CP / RP), and the exp_mode enum.
The C sources under src/ fall into a few groups:
- Experiment modes (
exp_*.c) — one file perexp_mode, each providing the*_test()entry thatmain.cdispatches to: exp_sender.c, exp_receiver.c, exp_roce.c, exp_custom_seq.c, and exp_capability_test.c. - Packet generation / TX — fake_roce_pkt.c builds and clones forged RoCEv2 packets (including the PSN-only ICRC fast-path) and drives the TX burst loops (single-threaded, multi-threaded, and dynamic-PSN variants).
- RoCE sink (RX side) — roce_sink_dpdk.c, roce_sink_cnp.c, roce_sink_rawqp.c, and roce_sink_stats.c receive, parse, and account for incoming RoCE/CNP traffic.
- Real RDMA verbs path — rdma_rc.c, rdma_op.c, and rdma_op_stats.c establish real RDMA RC connections through libibverbs, post work requests, and collect completion statistics.
- Infrastructure — arg_parser.c (command-line and YAML config parsing), info_exchange.c (out-of-band peer handshake), state_machine.c (the time-sequenced state-machine engine used to schedule sends; see State_machine.md), rte_flow_setup.c (rte_flow rules), cnp_sampler.c, csv_writer.c, and utils.c.