Skip to content

Commit

Permalink
FreeBSD networking test results.
Browse files Browse the repository at this point in the history
  • Loading branch information
eiz committed Mar 13, 2017
1 parent 320e68e commit e5b6fcf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 6 additions & 1 deletion SarAsio/network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@
// same because the problem is the things Windows is doing, not the
// hardware. An NDIS filter driver may end up being a valid alternative to
// using RIO.
// - FreeBSD netmap results are in. Test setup: 2 machines with Intel
// X520-DA2 cards, hw.ix.max_interrupt_rate=0, running nm_ping with
// 'rtprio 0', with BUSY_WAIT enabled. Average: 10us, worst case: 25us.
// With BUSY_WAIT off, worst case is consistently around 300us due to
// scheduling delay. These are the values I want to see.
// - winsock initialization
// - rio initialization
// - message send routines
Expand Down Expand Up @@ -138,4 +143,4 @@
// <- open interface
// <- close interface
// <- tick
// <- buffer
// <- buffer
3 changes: 3 additions & 0 deletions nm_ping/nm_ping.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <arpa/inet.h>
#include <poll.h>

#define BUSY_WAIT
#define MAC_FORMAT "%02X:%02X:%02X:%02X:%02X:%02X"
#define MAC_VALUES(v) (v)[0], (v)[1], (v)[2], (v)[3], (v)[4], (v)[5]
#define IP4_FORMAT "%d.%d.%d.%d"
Expand Down Expand Up @@ -428,6 +429,8 @@ static void clientLoop()

if (iterEnd - iterStart > worstLatency) {
worstLatency = iterEnd - iterStart;
printf("worst case %08" PRIx64 " %" PRIu64 "us\n",
index, worstLatency / 1000);
}
}

Expand Down

0 comments on commit e5b6fcf

Please sign in to comment.