net_util: Support supplying flags to open_tap() helper

This helper can open a TAP device and configure the interface on it. If
the device needs to be opened multiple times for MQ then it also handles
that correctly.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2021-01-27 17:52:22 +00:00
parent c4fb0f36bd
commit 5db9b0ec99
3 changed files with 5 additions and 3 deletions

View File

@@ -283,7 +283,7 @@ impl Net {
queue_size: u16,
seccomp_action: SeccompAction,
) -> Result<Self> {
let taps = open_tap(if_name, ip_addr, netmask, host_mac, num_queues / 2)
let taps = open_tap(if_name, ip_addr, netmask, host_mac, num_queues / 2, None)
.map_err(Error::OpenTap)?;
Self::new_with_tap(