This allows any type that can be converted into an `i64` to be used when
creating an Instant. Because this is no longer a concrete type, this
change may break existing code like the following:
error: attempt to multiply with overflow
--> src/time.rs:282:37
|
282 | epoc = Instant::from_millis(2085955200 * 1000).into();
| ^^^^^^^^^^^^^^^^^
|
= note: #[deny(const_err)] on by default
Closes: #272
Approved by: whitequark
Only allowing four missing packets is hurting
performance for large receive windows.
The new value was picked by observing good
performance with 500 kB socket buffers.
Closes: #264
Approved by: whitequark
The current hole was always shrinked even if the
packet assembler rejected adding a packet due to
not being able to insert a new hole.
Shrink only after a new hole was added.
Shrinking before or after does not make a difference
because offset + size < hole_size and thus
contigs[index] is not empty, passing the
debug_assert in add_contig_at.
https://github.com/m-labs/smoltcp/issues/261Closes: #265
Approved by: whitequark
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.
The presence of TCP options will only increase
the header length to muliples of 4. The added
padding consists of zeros.
This also fixes an emit panic when the Window
Scale and MSS options result in a length of 27
which then gets floored to 24 when applied to
the header.
Closes: #251
Approved by: whitequark
The size of the contiguous window should be prioritized over the size of
the contiguous window if padding were added.
For example, given the following packet buffer:
1 2 3
|---|----|------|
If 2 is used and 1 and 3 are empty, enqueing a buffer of size 4 should
be placed in contiguous window 3 and the size of 1 should not cause
any issues in enqueue.
Closes: #247
Approved by: whitequark
Using Routes<'static> used to make these functions impossible because it created a reference that needed to be valid for the static lifetime
Closes: #243
Approved by: dlrobertson
Improve detection of duplicate ACKs by checking that the segment does
not contain data.
Move implementation from the 'reject unacceptable acknowledgements'
to later in the process function, because a duplicate ACK is not an
'unacceptable' acknowledgement but rather a condition to update state.
Implement more tests to verify the operation of the fast retransmit
implementation.
Related issue: #224Closes: #225
Approved by: whitequark
- Add a helper function for returning an error in the implementation of
next
- Add an assert in Ipv6OptionsIterator::new that ensures that an
iterator is not created with a length field larger than that of the
data buffer we're iterating over.
Closes: #230
Approved by: dlrobertson
The IPv6 Option representation layer structure includes the type value
as the raw u8. This should be stored as the Type enum.
Closes: #229
Approved by: whitequark
- Do not require the packet structure of the header have the same
lifetime as the underlying bytes or the parsed representation.
- Add the bytes of the contained options to the parsed representation
structure.
- Add the IPv6OptionsIterator structure to make iterating over the
contained options easier.
Closes: #212
Approved by: whitequark
This optimization makes sure that enqueueing to an empty ring buffer
would never wrap around, in turn ensuring that enqueueing to an empty
packet buffer would never use more than one metadata entry.
Right now, pushing buffer-sized packets into a packet buffer requires
at least two metadata entries, which is surprising and wasteful.