Skip to content

Commit 4c04617

Browse files
edumazetnealcardwell
authored andcommitted
net-test: packetdrill: set tolerance_percent to 12.5 %
According to Linux kernel commit 500462a9de657f86edaa102f8ab6bff7f7e43fc2 ("timers: Switch to a non-cascading wheel"), the worst case inaccuracy for linux timers is 12.5% Signed-off-by: Eric Dumazet <[email protected]> Change-Id: I29a50c51ec0c369b64d432065fd5b51fbd5049cc
1 parent 74bf21d commit 4c04617

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

gtests/net/packetdrill/config.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,15 @@ void set_default_config(struct config *config)
227227
config->ip_version = IP_VERSION_4;
228228
config->live_bind_port = 8080;
229229
config->live_connect_port = 8080;
230-
config->tolerance_percent = 0.5; /* 5ms / second */
230+
231+
/* No more slack on modern (v4.8) linux kernels for jiffie based timers
232+
* According to commit 500462a9de657f86edaa102f8ab6bff7f7e43fc2
233+
* ("timers: Switch to a non-cascading wheel"),
234+
* the worst case inaccuracy is 12.5%
235+
*/
236+
237+
config->tolerance_percent = 12.5;
238+
231239
config->tolerance_usecs = 4000;
232240
config->speed = TUN_DRIVER_SPEED_CUR;
233241
config->mtu = TUN_DRIVER_DEFAULT_MTU;

0 commit comments

Comments
 (0)