Packet Distributor
A example application to distribute packets to workers.
Explanation
This example contains 1 rx thread, 1 tx thread, and 4 worker threads.
The rx thread receives packets, and then passes one packet to a worker via lockless ring each time.
The worker thread dequeues packets from its lockless ring and swaps packets' MAC address, and enqueues processed packets to another lockless ring shared by all workers.
The tx thread reads packets from the lockless ring to send.
Config
Usage
An example to distribute packets via lockless rings between worker threads
Usage:
distributor -c config.jsonc [flags]
Flags:
-c, --config string path to configuration file
-h, --help help for distributor
-V, --verbose verbose output
-v, --version version for distributor
Run
./run_distributor -c config.jsonc