Skip to content

Commit

Permalink
firmware: Use larger ARP cache
Browse files Browse the repository at this point in the history
This works around a problematic interaction between ARP cache
expiry in smoltcp (with its 3 seconds timeout before a discovery
request is sent) and our TCP keepalive settings, where the timeout
is reached before the keepalive had a chance to be sent.

GitHub: Closes #1150.
  • Loading branch information
dnadlinger authored and whitequark committed Sep 18, 2018
1 parent 7565d81 commit b482f5f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions artiq/firmware/runtime/main.rs
Expand Up @@ -270,9 +270,8 @@ fn startup_ethernet() {
smoltcp::phy::EthernetTracer::new(net_device, net_trace_fn)
};

let mut neighbor_map = [None; 8];
let neighbor_cache =
smoltcp::iface::NeighborCache::new(&mut neighbor_map[..]);
smoltcp::iface::NeighborCache::new(alloc::btree_map::BTreeMap::new());
let mut interface =
smoltcp::iface::EthernetInterfaceBuilder::new(net_device)
.neighbor_cache(neighbor_cache)
Expand Down

2 comments on commit b482f5f

@sbourdeauducq
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@whitequark Can this go on release-3 as well?

@whitequark
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

Please sign in to comment.