network: configure mtu and segmentation offloading properly

This commit is contained in:
Alex Zenla
2024-03-04 12:19:03 +00:00
parent 9350a7520d
commit 17889d1c64
8 changed files with 131 additions and 7 deletions

View File

@ -0,0 +1,13 @@
use std::env;
use anyhow::Result;
use krata::ethtool::EthtoolHandle;
fn main() -> Result<()> {
let args = env::args().collect::<Vec<String>>();
let interface = args.get(1).unwrap();
let mut handle = EthtoolHandle::new()?;
handle.set_gso(interface, false)?;
handle.set_tso(interface, false)?;
Ok(())
}