From 70fcfad42fa5a72580822c40d7a73a23fcd5355a Mon Sep 17 00:00:00 2001 From: Fredi Raspall Date: Fri, 7 Feb 2025 17:09:35 +0100 Subject: [PATCH] dataplane: hardcode allowed pci addr in args 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 --- dataplane/src/args.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/dataplane/src/args.rs b/dataplane/src/args.rs index 5aa45be3..a09604d4 100644 --- a/dataplane/src/args.rs +++ b/dataplane/src/args.rs @@ -11,7 +11,7 @@ pub(crate) struct CmdArgs { main_lcore: u8, #[arg(long, value_name = "map lcore set to cpu set")] lcores: Option, - #[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, @@ -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 } }