mirror of
				https://github.com/edera-dev/krata.git
				synced 2025-11-03 23:29:39 +00:00 
			
		
		
		
	network: configure mtu and segmentation offloading properly
This commit is contained in:
		
							
								
								
									
										13
									
								
								shared/examples/ethtool.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								shared/examples/ethtool.rs
									
									
									
									
									
										Normal 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(())
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user