File tree 4 files changed +555
-8
lines changed
4 files changed +555
-8
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ Rust wrapper for Intel DPDK.
18
18
rust-dpdk-sys = { path = " ../dpdk-sys" }
19
19
thiserror = " 1"
20
20
etrace = " 1"
21
+ log = " 0.4"
22
+ simple_logger = " 1"
21
23
22
24
[lib ]
23
25
name = " dpdk"
Original file line number Diff line number Diff line change 1
1
extern crate dpdk;
2
+ extern crate log;
3
+ extern crate simple_logger;
2
4
3
5
use dpdk:: eal:: * ;
6
+ use log:: debug;
4
7
use std:: env;
5
8
6
9
fn main ( ) {
10
+ simple_logger:: init ( ) . unwrap ( ) ;
7
11
let mut args: Vec < String > = env:: args ( ) . collect ( ) ;
8
12
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 ( ) ;
13
17
}
You can’t perform that action at this time.
0 commit comments