Skip to content

Commit 69d4c0a

Browse files
rogelioRuizrbradford
authored andcommitted
net_util: Treat tap EIO as transient error
Like EINVAL treat a EIO error from writing to the tap as a transient error that should not be VM fatal. Such an error could be generated when the TAP device is not yet ready as part of a restore cycle. Fixes cloud-hypervisor#8722 Assisted-by: Claude:Fable-5 Signed-off-by: Rogelio Ruiz <rruiz@techxagon.io>
1 parent 95bb967 commit 69d4c0a

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

net_util/src/queue_pair.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ impl TxVirtio {
138138
if e.raw_os_error() == Some(libc::EINVAL) {
139139
error!("net: tx: dropping malformed packet: {e}");
140140
0
141+
} else if e.raw_os_error() == Some(libc::EIO) {
142+
error!("net: tx: dropping frame, tap I/O error: {e}");
143+
0
141144
} else {
142145
error!("net: tx: failed writing to tap: {e}");
143146
return Err(NetQueuePairError::WriteTap(e));

0 commit comments

Comments
 (0)