Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions lib/propolis/src/hw/virtio/queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -520,10 +520,16 @@ impl VirtQueue {
false => ChainBuf::Readable(GuestAddr(desc.addr), desc.len),
};

count += 1;
len += desc.len;
chain.push_buf(buf);

if flags.contains(DescFlag::NEXT) {
if count == self.size() {
// XXX: signal error condition?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to address #1190 to properly solve this.
Currently return None and we also fail to return the descriptor to the used ring, this can leave the queue stalled or in an overall bad state.

chain.idx = None;
return None;
}
// XXX: better error handling
desc = idescs.get(desc.next as usize).unwrap();
flags = DescFlag::from_bits_truncate(desc.flags);
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.