diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 7e2e08e..8bd2545 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -1,25 +1,65 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. [[package]] -name = "linked_list_allocator" -version = "0.6.3" +name = "bitflags" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "buddy_system_allocator" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "spin 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "spin 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "cfg-if" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "isomorphic_drivers" +version = "0.1.0" +source = "git+https://github.com/rcore-os/isomorphic_drivers#6716a5df04455ff58d90e296ec4fcd7f40f878e9" +dependencies = [ + "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "spin 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "volatile 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "log" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rcore-user" version = "0.1.0" dependencies = [ - "linked_list_allocator 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "buddy_system_allocator 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "isomorphic_drivers 0.1.0 (git+https://github.com/rcore-os/isomorphic_drivers)", ] [[package]] name = "spin" -version = "0.4.10" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "volatile" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" [metadata] -"checksum linked_list_allocator 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "655d57c71827fe0891ce72231b6aa5e14033dae3f604609e6a6f807267c1678d" -"checksum spin 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ceac490aa12c567115b40b7b7fceca03a6c9d53d5defea066123debc83c5dc1f" +"checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" +"checksum buddy_system_allocator 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2ed828f1e227d6e32b998d6375b67fd63ac5389d50b23f258ce151d22b6cc595" +"checksum cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "11d43355396e872eefb45ce6342e4374ed7bc2b3a502d1b28e36d6e23c05d1f4" +"checksum isomorphic_drivers 0.1.0 (git+https://github.com/rcore-os/isomorphic_drivers)" = "" +"checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6" +"checksum spin 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "44363f6f51401c34e7be73db0db371c04705d35efbe9f7d6082e03a921a32c55" +"checksum volatile 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "6af0edf5b4faacc31fc51159244d78d65ec580f021afcef7bd53c04aeabc7f29" diff --git a/rust/src/bin/genpkts.rs b/rust/src/bin/genpkts.rs index 758091f..e7d7366 100644 --- a/rust/src/bin/genpkts.rs +++ b/rust/src/bin/genpkts.rs @@ -69,7 +69,8 @@ pub fn main() { 0x0a, 0x00, 0x00, 0x02, // ip 0x00, 0x16, 0x31, 0xff, 0xa4, 0x9f, // mac 0x0a, 0x00, 0x00, 0x01]; // ip - let tx_batch = vec![&data[..]; 1024]; + let size = 2048; + let tx_batch = vec![&data[..]; size]; println!("IXGBE driver waiting for link up"); while !ixgbe.is_link_up() {} println!("IXGBE driver link is up"); @@ -80,6 +81,8 @@ pub fn main() { 0x00, 0x16, 0x31, 0xff, 0xa4, 0x9f, // mac 0xff, 0xff]; // unknown */ - ixgbe.msend(tx_batch.as_slice()); + if ixgbe.msend(tx_batch.as_slice()) < size { + println!("Waiting for queue"); + } } }