forked from M-Labs/artiq-zynq
drtio: demote default routing table message to info
This commit is contained in:
parent
0530e596ba
commit
ebdb08180d
|
@ -58,20 +58,17 @@ impl fmt::Display for RoutingTable {
|
||||||
pub fn config_routing_table(default_n_links: usize, cfg: &Config) -> RoutingTable {
|
pub fn config_routing_table(default_n_links: usize, cfg: &Config) -> RoutingTable {
|
||||||
let mut ret = RoutingTable::default_master(default_n_links);
|
let mut ret = RoutingTable::default_master(default_n_links);
|
||||||
if let Ok(data) = cfg.read("routing_table") {
|
if let Ok(data) = cfg.read("routing_table") {
|
||||||
if data.len() == DEST_COUNT*MAX_HOPS
|
if data.len() == DEST_COUNT*MAX_HOPS {
|
||||||
{
|
|
||||||
for i in 0..DEST_COUNT {
|
for i in 0..DEST_COUNT {
|
||||||
for j in 0..MAX_HOPS {
|
for j in 0..MAX_HOPS {
|
||||||
ret.0[i][j] = data[i*MAX_HOPS+j];
|
ret.0[i][j] = data[i*MAX_HOPS+j];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
warn!("length of the configured routing table is incorrect, using default");
|
||||||
}
|
}
|
||||||
else {
|
} else {
|
||||||
warn!("length of the routing table is incorrect, using default");
|
info!("could not read routing table from configuration, using default");
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
warn!("could not read routing table from configuration, using default");
|
|
||||||
}
|
}
|
||||||
info!("routing table: {}", ret);
|
info!("routing table: {}", ret);
|
||||||
ret
|
ret
|
||||||
|
|
Loading…
Reference in New Issue