vhost_user_net: Consolidate the vhost-user-net backend syntax

Rather than repeat syntax for the vhost-user-net backend in multiple
places store it in one place and reference it from the required places.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2020-05-08 16:11:00 +01:00
committed by Sebastien Boeuf
parent 0d2be3b6d4
commit 3220292d45
3 changed files with 6 additions and 10 deletions
+4
View File
@@ -77,6 +77,10 @@ pub enum Error {
OpenTap(vm_virtio::net_util::Error),
}
pub const SYNTAX: &str = "vhost-user-net backend parameters \
\"ip=<ip_addr>,mask=<net_mask>,sock=<socket_path>,\
num_queues=<number_of_queues>,queue_size=<size_of_each_queue>,tap=<if_name>\"";
impl fmt::Display for Error {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "vhost_user_net_error: {:?}", self)