Bump smoltcp to newest git version

This commit is contained in:
Yuke Peng
2024-08-22 14:34:41 +08:00
committed by Tate, Hongliang Tian
parent 7db9ae23a3
commit bb4751741a
9 changed files with 54 additions and 62 deletions

View File

@ -10,11 +10,24 @@ align_ext = { path = "../../../ostd/libs/align_ext" }
aster-util = { path = "../../libs/aster-util" }
aster-rights = { path = "../../libs/aster-rights" }
bitflags = "1.3"
bitvec = { version = "1.0.1", default-features = false, features = ["alloc"]}
bitvec = { version = "1.0.1", default-features = false, features = ["alloc"] }
component = { path = "../../libs/comp-sys/component" }
int-to-c-enum = { path = "../../libs/int-to-c-enum" }
log = "0.4"
ostd = { path = "../../../ostd" }
ringbuf = { version = "0.3.2", default-features = false, features = ["alloc"] }
smoltcp = { version = "0.9.1", default-features = false, features = ["alloc", "log", "medium-ethernet", "medium-ip", "proto-dhcpv4", "proto-ipv4", "proto-igmp", "socket-icmp", "socket-udp", "socket-tcp", "socket-raw", "socket-dhcpv4"] }
smoltcp = { git = "https://github.com/smoltcp-rs/smoltcp", rev = "dc08e0b", default-features = false, features = [
"alloc",
"log",
"medium-ethernet",
"medium-ip",
"proto-dhcpv4",
"proto-ipv4",
"proto-igmp",
"socket-icmp",
"socket-udp",
"socket-tcp",
"socket-raw",
"socket-dhcpv4",
] }
spin = "0.9.4"

View File

@ -37,12 +37,12 @@ pub struct RxToken(RxBuffer);
impl phy::RxToken for RxToken {
fn consume<R, F>(self, f: F) -> R
where
F: FnOnce(&mut [u8]) -> R,
F: FnOnce(&[u8]) -> R,
{
let mut packet = self.0.packet();
let mut buffer = vec![0u8; packet.remain()];
packet.read(&mut VmWriter::from(&mut buffer as &mut [u8]));
f(&mut buffer)
f(&buffer)
}
}

View File

@ -23,7 +23,7 @@ component = { path = "../../libs/comp-sys/component" }
log = "0.4"
bit_field = "0.10.1"
int-to-c-enum = { path = "../../libs/int-to-c-enum" }
smoltcp = { version = "0.9.1", default-features = false, features = [
smoltcp = { git = "https://github.com/smoltcp-rs/smoltcp", rev = "dc08e0b", default-features = false, features = [
"alloc",
"log",
"medium-ethernet",