net_util: Don't always set the tap offload

Setting the tap offload should only be done based on the features that
are acked by the guest. Therefore it is incorrect to set these upon
opening the tap.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2021-04-26 16:30:44 +01:00
committed by Sebastien Boeuf
parent 70e926372a
commit b945a341b3
2 changed files with 0 additions and 6 deletions

View File

@@ -191,10 +191,7 @@ impl Tap {
}
let tap = Tap { tap_file, if_name };
let offload_flags =
net_gen::TUN_F_CSUM | net_gen::TUN_F_UFO | net_gen::TUN_F_TSO4 | net_gen::TUN_F_TSO6;
let vnet_hdr_size = vnet_hdr_len() as i32;
tap.set_offload(offload_flags)?;
tap.set_vnet_hdr_size(vnet_hdr_size)?;
Ok(tap)