Skip to content

Commit

Permalink
fix(virtqueue/packed): simplify DrvNotif::enable_specific
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Kröning <martin.kroening@eonerc.rwth-aachen.de>
  • Loading branch information
mkroening committed Jun 18, 2024
1 parent ad9bdc1 commit 6152b0c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/drivers/virtio/virtqueue/packed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -881,10 +881,7 @@ impl DrvNotif {
// Check if VIRTIO_F_RING_EVENT_IDX has been negotiated
if self.f_notif_idx {
self.raw.flags |= 1 << 1;
// Reset event fields
self.raw.event = 0;
self.raw.event = at_offset;
self.raw.event |= (at_wrap as u16) << 15;
self.raw.event = at_offset | (at_wrap as u16) << 15;
}
}
}
Expand Down

0 comments on commit 6152b0c

Please sign in to comment.