Commit b6d44191 authored by Antoine Kaufmann's avatar Antoine Kaufmann
Browse files

libnicbm: fixes for unsynchronized operation

parent 0a67f9b1
...@@ -332,6 +332,7 @@ Runner::Runner(Device &dev_) ...@@ -332,6 +332,7 @@ Runner::Runner(Device &dev_)
int Runner::runMain(int argc, char *argv[]) int Runner::runMain(int argc, char *argv[])
{ {
uint64_t next_ts; uint64_t next_ts;
uint64_t max_step = 10000;
if (argc != 4 && argc != 5) { if (argc != 4 && argc != 5) {
fprintf(stderr, "Usage: corundum_bm PCI-SOCKET ETH-SOCKET " fprintf(stderr, "Usage: corundum_bm PCI-SOCKET ETH-SOCKET "
...@@ -376,8 +377,10 @@ int Runner::runMain(int argc, char *argv[]) ...@@ -376,8 +377,10 @@ int Runner::runMain(int argc, char *argv[])
if (is_sync) { if (is_sync) {
next_ts = netsim_next_timestamp(&nsparams); next_ts = netsim_next_timestamp(&nsparams);
if (next_ts > main_time + max_step)
next_ts = main_time + max_step;
} else { } else {
next_ts = main_time + 100000; next_ts = main_time + max_step;
} }
uint64_t ev_ts; uint64_t ev_ts;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment