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
...@@ -254,6 +254,11 @@ Simulator instproc make-lan {nodelist bw delay args} { ...@@ -254,6 +254,11 @@ Simulator instproc make-lan {nodelist bw delay args} {
# Convert bandwidth and delay # Convert bandwidth and delay
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) {}
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