net_util: Move virtio-net helpers to net_util crate

Moving helpers to the net_util crate since we don't want virtio-net
common code to be split between two places. The net_util crate should be
the only place to host virtio-net common code.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf
2021-05-21 12:25:18 +02:00
parent f36b5f3e3c
commit d7a69f8aa1
6 changed files with 85 additions and 74 deletions
+1 -2
View File
@@ -1,14 +1,13 @@
// Copyright 2019 Intel Corporation. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
use super::super::net_util::{build_net_config_space, VirtioNetConfig};
use super::super::{
ActivateError, ActivateResult, Queue, VirtioCommon, VirtioDevice, VirtioDeviceType,
};
use super::vu_common_ctrl::*;
use super::{Error, Result};
use crate::VirtioInterrupt;
use net_util::MacAddr;
use net_util::{build_net_config_space, MacAddr, VirtioNetConfig};
use std::ops::Deref;
use std::os::unix::io::AsRawFd;
use std::os::unix::net::UnixListener;