Skip to content

Commit

Permalink
Merge pull request #838 from stlankes/mtu
Browse files Browse the repository at this point in the history
uses Ehernet MTU as definition of HERMIT_MTU
  • Loading branch information
stlankes authored Aug 13, 2023
2 parents ff228dd + d0e96d8 commit 2e02cdb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/drivers/net/virtio_mmio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ impl VirtioNetDriver {
let notif_cfg = NotifCfg::new(registers);

let mtu = if let Some(my_mtu) = hermit_var!("HERMIT_MTU") {
u16::from_str(&my_mtu).unwrap() + 14
u16::from_str(&my_mtu).unwrap()
} else {
// fallback to the default MTU
1514
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/net/virtio_pci.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ impl VirtioNetDriver {
};

let mtu = if let Some(my_mtu) = hermit_var!("HERMIT_MTU") {
u16::from_str(&my_mtu).unwrap() + 14
u16::from_str(&my_mtu).unwrap()
} else {
// fallback to the default MTU
1514
Expand Down

0 comments on commit 2e02cdb

Please sign in to comment.