mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-05 18:20:34 +00:00
devices: vvu-proxy: Reports an error happening in worker thread
BUG=none TEST=run vvu Change-Id: I80f05c7c0d066f458279f6908b4ba7296f873e49 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3640878 Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Reviewed-by: Abhishek Bhardwaj <abhishekbh@chromium.org> Auto-Submit: Keiichi Watanabe <keiichiw@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
This commit is contained in:
parent
0124707336
commit
416a9cdd85
1 changed files with 8 additions and 12 deletions
|
@ -277,7 +277,7 @@ impl Worker {
|
|||
// Represents if |slave_req_helper.endpoint| is being monitored for data
|
||||
// from the Vhost-user sibling.
|
||||
let mut sibling_socket_polling_enabled = true;
|
||||
'wait: loop {
|
||||
loop {
|
||||
let events = wait_ctx.wait().context("failed to wait for events")?;
|
||||
for event in events.iter().filter(|e| e.is_readable) {
|
||||
match event.token {
|
||||
|
@ -305,8 +305,7 @@ impl Worker {
|
|||
}
|
||||
Token::RxQueue => {
|
||||
if let Err(e) = rx_queue_evt.read() {
|
||||
error!("error reading rx queue Event: {}", e);
|
||||
break 'wait;
|
||||
bail!("error reading rx queue Event: {}", e);
|
||||
}
|
||||
|
||||
// Rx buffers are available, now we should monitor the
|
||||
|
@ -324,34 +323,31 @@ impl Worker {
|
|||
}
|
||||
Token::TxQueue => {
|
||||
if let Err(e) = tx_queue_evt.read() {
|
||||
error!("error reading tx queue event: {}", e);
|
||||
break 'wait;
|
||||
bail!("error reading tx queue event: {}", e);
|
||||
}
|
||||
self.process_tx();
|
||||
}
|
||||
Token::SiblingKick { index } => {
|
||||
if let Err(e) = self.process_sibling_kick(index) {
|
||||
error!(
|
||||
bail!(
|
||||
"error processing sibling kick for {}-th vring: {}",
|
||||
index, e
|
||||
index,
|
||||
e
|
||||
);
|
||||
break 'wait;
|
||||
}
|
||||
}
|
||||
Token::MainThread => {
|
||||
if let Err(e) = self.process_doorbell_message(&main_thread_tube) {
|
||||
error!("error processing doorbell message: {}", e);
|
||||
break 'wait;
|
||||
bail!("error processing doorbell message: {}", e);
|
||||
}
|
||||
}
|
||||
Token::Kill => {
|
||||
let _ = kill_evt.read();
|
||||
break 'wait;
|
||||
return Ok(());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
// Processes data from the Vhost-user sibling and forwards to the driver via Rx buffers.
|
||||
|
|
Loading…
Reference in a new issue