When reading packets or network data from a tunnel interface, the order in which they are read does matter as they can impact connectionless protocols and also cause stateful protocols to spend time re-ordering data! There were three techniques that I tried implementing to solve this issue:
- Map a packet address to a thread index during the entire time of every connection state
- Index and order every packet read by number and wait to write them out in the same sequence
- Lock and time and order each threaded process just like many pistons firing inside of an engine block
~