Disable ethernet-related features and framing based on a feature gate.
Add a no-ethernet option to Travis.
notes:
- allow(unused) is added when not using ethernet feature
- Don't run pretty-print doctest, ethernet is optional.
Closes: #308
Approved by: whitequark
Since 0.4.4, log uses #[macro_export(local_inner_macros)], which is
the right thing to do, but it breaks our CI because of a now-unused
\#[macro_use(log)].
This doesn't affect downstream code because log 0.3.9 is a facade
crate implemented in terms of log 0.4, and so log 0.3 and log 0.4
APIs can be used together.
This cargo feature only exists because (a) ARTIQ uses a fork of Rust,
(b) Rust has some ridiculous renaming going on in the alloc crate,
(c) smoltcp exists because of ARTIQ.
Such features will not be ordinarily provided by smoltcp.
Ensure that cargo does not attempt to autodiscover examples. This causes
problems with utils.rs and ensures that an example section exists in the
Cargo.toml.
The previous model was flawed. Consider the following case:
* The main loop looks as follows (pseudocode):
loop {
let _ = (tcp:1234).read_all()
wait(iface.poll())
}
* The remote end is continuously transmitting data and at some
point fills the window of (tcp:1234), stopping the transmission
afterwards.
* The local end processes the packets and, as a part of egress
routine, emits an ACK. That also updates the window, and
the socket's poll_at() routine returns None, since there is
nothing to transmit or retransmit.
* The local end now waits indefinitely even though it can start
processing the data in the socket buffers right now.
Run it without the `log` feature and in release mode:
$ cargo run --release \
--no-default-features \
--features std,phy-tap_interface,socket-tcp \
--example stress tap0 \
[reader|writer]
There are currently two bugs exposed by it:
* a crash in the reader mode,
* slow-down in the writer mode.
- Add the ipv6 feature
- Ensure a travis build with the ipv6 feature enabled.
- Add the necessary infrastructure to wire for ipv6 support.
- Ipv6Address
- Ipv6Cidr
- Add Ipv6 Address and Cidr parsing to parsers
- Add basic tests.