Commit 8e2b9a20 authored by Mike Hibler's avatar Mike Hibler
Browse files

Warn about odd delay values for LANs, which may get rounded up when implemented

on delay nodes.  E.g., a delay of 5ms is split up as 2.5ms for every node in
the LAN, and we round that to 3ms before handing to dummynet.

This will produce linktest errors.
parent 0623acd0
...@@ -255,6 +255,11 @@ Simulator instproc make-lan {nodelist bw delay args} { ...@@ -255,6 +255,11 @@ Simulator instproc make-lan {nodelist bw delay args} {
set rbw [parse_bw $bw] set rbw [parse_bw $bw]
set rdelay [parse_delay $delay] set rdelay [parse_delay $delay]
# Warn about potential rounding of delay values due to implementation
if { ($rdelay % 2) == 1 } {
puts stderr "*** WARNING: due to delay implementation, odd delay value $rdelay for LAN may be rounded up"
Lan $curlan $self $nodelist $rbw $rdelay {} Lan $curlan $self $nodelist $rbw $rdelay {}
set lanlink_list($curlan) {} set lanlink_list($curlan) {}
set last_class $curlan set last_class $curlan
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