Thread (15 messages) 15 messages, 3 authors, 2022-12-26

Re: [RFC PATCH 4/4] virtio-net: sleep instead of busy waiting for cvq command

From: Jason Wang <jasowang@redhat.com>
Date: 2022-12-26 03:46:48
Also in: lkml, virtualization

On Fri, Dec 23, 2022 at 3:39 PM Alvaro Karsz [off-list ref] wrote:
quoted
This needs to be proposed to the virtio spec first. And actually we
need more than this:

1) we still need a way to deal with the device without this feature
2) driver can't depend solely on what is advertised by the device (e.g
device can choose to advertise a very long timeout)
I think that I wasn't clear, sorry.
I'm not talking about a new virtio feature, I'm talking about a situation when:
* virtio_net issues a control command.
* the device gets the command, but somehow, completes the command
after timeout.
* virtio_net assumes that the command failed (timeout), and issues a
different control command.
* virtio_net will then call virtqueue_wait_for_used, and will
immediately get the previous response (If I'm not wrong).

So, this is not a new feature that I'm proposing, just a situation
that may occur due to cvq timeouts.

Anyhow, your solution calling BAD_RING if we reach a timeout should
prevent this situation.
Right, that is the goal.

Thanks
Thanks
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help