I am sending network packets from one thread and receiving replies on a 2nd thread that runs on a different CPU core. My process measures the time between send & receiv
You can set thread affinity using sched_set_affinity() API in order to run your thread on one CPU core.
sched_set_affinity()