From f21d54f6b0a1e360ec6b9cb991155aedb5dedfae Mon Sep 17 00:00:00 2001 From: Cathy Zhang Date: Wed, 28 Aug 2019 17:54:43 +0800 Subject: [PATCH] main: Add arguments entry for vhost-user-net Signed-off-by: Cathy Zhang --- src/main.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/main.rs b/src/main.rs index 6d6b3ef76..772671c4f 100755 --- a/src/main.rs +++ b/src/main.rs @@ -154,6 +154,17 @@ fn main() { .takes_value(true) .min_values(1), ) + .arg( + Arg::with_name("vhost-user-net") + .long("vhost-user-net") + .help( + "Network parameters \"mac=,\ + sock=, num_queues=,\ + queue_size=\"", + ) + .takes_value(true) + .min_values(1), + ) .arg( Arg::with_name("v") .short("v") @@ -186,6 +197,9 @@ fn main() { let fs: Option> = cmd_arguments.values_of("fs").map(|x| x.collect()); let pmem: Option> = cmd_arguments.values_of("pmem").map(|x| x.collect()); let devices: Option> = cmd_arguments.values_of("device").map(|x| x.collect()); + let vhost_user_net: Option> = cmd_arguments + .values_of("vhost-user-net") + .map(|x| x.collect()); let log_level = match cmd_arguments.occurrences_of("v") { 0 => LevelFilter::Error, @@ -224,6 +238,7 @@ fn main() { serial, console, devices, + vhost_user_net, }) { Ok(config) => config, Err(e) => {