Skip to content

Commit

Permalink
dataplane: hardcode allowed pci addr in args
Browse files Browse the repository at this point in the history
This commit is to be reverted, but allows starting the dataplane
without any arg, as it was before. Also, printed the config, which
should be replaced by logs.

Signed-off-by: Fredi Raspall <[email protected]>
  • Loading branch information
Fredi-raspall committed Feb 7, 2025
1 parent 4fbcc59 commit 70fcfad
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion dataplane/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pub(crate) struct CmdArgs {
main_lcore: u8,
#[arg(long, value_name = "map lcore set to cpu set")]
lcores: Option<String>,
#[arg(long, value_name = "in-memory flag", default_value_t = false)]
#[arg(long, value_name = "in-memory flag", default_value_t = true)]
in_memory: bool,
#[arg(long, value_name = "PCI devices to probe")]
allow: Vec<String>,
Expand Down Expand Up @@ -68,12 +68,21 @@ impl CmdArgs {
out.push(a.to_owned());
}

// To be removed
if self.allow.len() == 0 {
out.push("--allow".to_string());
out.push("0000:01:00.0,dv_flow_en=1".to_string());
}

/* --log-level */
for level in self.log_level.iter() {
out.push("--log-level".to_string());
out.push(level.to_owned());
}

// To replace by log
println!("DPDK EAL init params: {:#?}", out);

out
}
}

0 comments on commit 70fcfad

Please sign in to comment.