fix bugs and improve user experiance (#86)

* correctly set mtu, and allow set mtu manually

* communicate between enc and non-enc should not panic

* allow loading cfg from file

* allow change file log level dynamically
This commit is contained in:
Sijie.Sun
2024-05-07 00:38:05 +08:00
committed by GitHub
parent e5b537267e
commit 8440eb842b
8 changed files with 211 additions and 76 deletions
+8
View File
@@ -286,6 +286,14 @@ impl VirtualNic {
todo!("queue_num != 1")
}
config.queues(self.queue_num);
let flags = self.global_ctx.config.get_flags();
let mut mtu_in_config = flags.mtu;
if flags.enable_encryption {
mtu_in_config -= 20;
}
config.mtu(mtu_in_config as i32);
config.up();
let dev = {