Skip to content

Commit feca226

Browse files
an-bors[bot]leeopop
an-bors[bot]
andauthored
Merge #29
29: CPU/RXQ/TXQ Layout r=jeehoonkang a=leeopop Co-authored-by: Keunhong Lee <[email protected]>
2 parents 24c430c + d11a089 commit feca226

File tree

4 files changed

+555
-8
lines changed

4 files changed

+555
-8
lines changed

dpdk/Cargo.toml

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ Rust wrapper for Intel DPDK.
1818
rust-dpdk-sys = { path = "../dpdk-sys" }
1919
thiserror = "1"
2020
etrace = "1"
21+
log = "0.4"
22+
simple_logger = "1"
2123

2224
[lib]
2325
name = "dpdk"

dpdk/bin/dpdk_test.rs

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
extern crate dpdk;
2+
extern crate log;
3+
extern crate simple_logger;
24

35
use dpdk::eal::*;
6+
use log::debug;
47
use std::env;
58

69
fn main() {
10+
simple_logger::init().unwrap();
711
let mut args: Vec<String> = env::args().collect();
812
let eal = Eal::new(&mut args).unwrap();
9-
println!("TSC Hz: {}", eal.get_tsc_hz());
10-
println!("TSC Cycles: {}", eal.get_tsc_cycles());
11-
println!("Random: {}", eal.rand());
12-
drop(eal);
13+
debug!("TSC Hz: {}", eal.get_tsc_hz());
14+
debug!("TSC Cycles: {}", eal.get_tsc_cycles());
15+
debug!("Random: {}", eal.rand());
16+
eal.setup(Affinity::Full, Affinity::Full).ok();
1317
}

0 commit comments

Comments
 (0)