Commit f0a08a9
virtio: avoid redundant invocation of Queue::is_valid()
The lifecycle of VirtIO queue object is as below:
1) MMIO transport driver creates queues
2) MMIO transport validates all queues are valid by calling Queue::is_valid()
3) Passing queues to VirtDevice by calling VirtDevice::activate()
4) VirtDevice device driver creates iterator to access available descritpors
5) MMIO transport reset the VirtDevice by calling VirtDevice::reset()
6) MMIO transport changes/destroys queues
The MMIO transport driver won't touch those queues between stage 3 and stage 5,
so Queue::is_valid will always return true during stage 4. Get rid of the
redundant invocation of Queue::is_valid() in Queue::iter().
Signed-off-by: Liu Jiang <[email protected]>1 parent 138760f commit f0a08a9
1 file changed
+0
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | 325 | | |
329 | 326 | | |
330 | 327 | | |
| |||
0 commit comments