Updating process loop to be defined by socket buffers when possible
Further changes after hardware testing
Fixing test
Adding CHANGELOG entry
Expanding comment after review
Update src/iface/interface/mod.rs
Co-authored-by: Catherine <whitequark@whitequark.org>
Removing redundant phrasing in comment
Updating verbiage to remove references to unsafe and safe
- Split mldv2_router_alert() in two, adding a new function named
push_padn_option(u8) to emit a PadN hop-by-hop option after any
other options have been pushed already
- When emiting ReportRecordReprs, remove the conditional block
that attempted to copy payload data over the destination record
- Handle payload copy outside of mld::AddressRecordRepr::emit()
- On unit test, use the parsed Hop-by-Hop option instead of checking
that the wire representation of the two structures is the same
- Minor code changes
Also, modify `test_join_ipv6_multicast_group()` so that it joins
the mDNS multicast group instead of 0xfe80::1. Because the lower 24
bits of 0xfe80::01 match the lower part of the IPv6 address assigned
to the test device by `crate::tests::setup()`, `has_multicast_group()`
would always returns `true`.
This patch rebases @jgallagher's to the tip of the main branch,
adding support for IPv6 multicast groups. As in the original PR,
it is only possible to join groups by sending an initial MLDv2
Report packet. It is not yet possible to resend the change report,
leave groups, respond to queries, etc.
- add CongestionController trait
- implement Cubic and NoControl
Signed-off-by: Yuuki Takano <ytakanoster@gmail.com>
feat(socket/tcp): add congestion_controller.rs
Signed-off-by: Yuuki Takano <ytakanoster@gmail.com>
feat(cubic): add test for TCP Cubic
Signed-off-by: Yuuki Takano <ytakanoster@gmail.com>
feat(cubic): do not update congestion as much as possible
If the last update time of the cwnd was less than 100ms ago,
don't update the congestion window.
Signed-off-by: Yuuki Takano <ytakanoster@gmail.com>
feat(cubic): implement slow start for TCP Cubic
Signed-off-by: Yuuki Takano <yuuki.takano@tier4.jp>
fix(cubic): use MSS as the minimum cwnd
Signed-off-by: Yuuki Takano <yuuki.takano@tier4.jp>
feat(tcp): add "socket-tcp-cubic" and "socket-tcp-reno" features
- "socket-tcp-cubic": use Cubic as a default congestion controller
- "socket-tcp-reno": use Reno as a default congestion controller
Signed-off-by: Yuuki Takano <yuuki.takano@tier4.jp>
fix(tcp): prepare new() for Socket<'a, DefaultCC>
All tests are passed because of this fix.
$ cargo test
$ cargo test --features socket-tcp-cubic
Signed-off-by: Yuuki Takano <yuuki.takano@tier4.jp>
feat(tcp, reno): add Reno of a congestion controller
Signed-off-by: Yuuki Takano <yuuki.takano@tier4.jp>
feat(cubic): do not use cbrt() and powi() for no_std
Signed-off-by: Yuuki Takano <yuuki.takano@tier4.jp>
fix(tcp): update for coverage test
Signed-off-by: Yuuki Takano <yuuki.takano@tier4.jp>
fix(cubic): do not use `abs()` for no_std
Signed-off-by: Yuuki Takano <yuuki.takano@tier4.jp>
fix(tcp): make some types regading congestion control private
Signed-off-by: Yuuki Takano <ytakanoster@gmail.com>
fix(tcp): make `CongestionController` `pub(super)`
Signed-off-by: Yuuki Takano <ytakanoster@gmail.com>
fix(tcp): make modules of congestion controllers private
- `cubic`, `reno` and `no_control` modules are now private.
- `ActiveCC` is now `pub(super)`
Signed-off-by: Yuuki Takano <ytakanoster@gmail.com>
fix: typo
Signed-off-by: Yuuki Takano <ytakanoster@gmail.com>
fix(tcp): use `defmt::Format` if `defmt` feature is specified
Signed-off-by: Yuuki Takano <ytakanoster@gmail.com>
fix(tcp): introduce `GenericController` for congestion control
Remove `socket-tcp-cubic` and `socket-tcp-reno` features
for congestion control.
Instead of the features, `set_congestion_control()`
is defined to set an algorithm of congestion control.
Signed-off-by: Yuuki Takano <ytakanoster@gmail.com>
feat(tcp): add a test for `(set|get)_congestion_control()`
Signed-off-by: Yuuki Takano <ytakanoster@gmail.com>
fix: restore unessesory change
Signed-off-by: Yuuki Takano <ytakanoster@gmail.com>
fix(tcp): rename congestion_controller to congestion
Signed-off-by: Yuuki Takano <ytakanoster@gmail.com>
fix(tcp): update the document about `Cubic`
Signed-off-by: Yuuki Takano <ytakanoster@gmail.com>
fix(tcp): do not use `Default` trait for congestion controller
Because `Default` trait requires `Size`,
returning `&dyn Trait` is rejected by the Rust compiler.
Signed-off-by: Yuuki Takano <ytakanoster@gmail.com>
chore(tcp): `#[allow(unused_variables)]` is moved on the trait
Signed-off-by: Yuuki Takano <ytakanoster@gmail.com>
feat(tcp): add `socket-tcp-cubic` feature for Cubic
Cubic uses f64 and it is inefficient on some platforms like STM32.
So, Cubic is disabled by default.
Signed-off-by: Yuuki Takano <ytakanoster@gmail.com>
fix: typo
Signed-off-by: Yuuki Takano <ytakanoster@gmail.com>
Update src/socket/tcp.rs
Co-authored-by: Catherine <whitequark@whitequark.org>
feat(tcp): add `socket-tcp-reno` feature for Reno
Signed-off-by: Yuuki Takano <ytakanoster@gmail.com>
feat(tcp): use GenericController::inner_*() methods
Signed-off-by: Yuuki Takano <ytakanoster@gmail.com>
fix(tcp): choose the best congestion controller
If Cubic is enabled, it is used as a default controller.
If Reno is enabled, it is used as a default controller.
If Cubic and Reno are eanabled, Cubic is a default controlerr,
but it can be specified by `set_congestion_control()` method.
Signed-off-by: Yuuki Takano <ytakanoster@gmail.com>
fix(tcp): rename CongestionController to Controller
Signed-off-by: Yuuki Takano <ytakanoster@gmail.com>
fix(tcp): rename GenericController to AnyController
Signed-off-by: Yuuki Takano <ytakanoster@gmail.com>
fix(tcp): add a document to `AnyController::new()`
Signed-off-by: Yuuki Takano <ytakanoster@gmail.com>
fix(tcp): use Controller instead of CongestionController
CongestionController has been renamed.
Signed-off-by: Yuuki Takano <ytakanoster@gmail.com>