On 1/10/19 10:47 PM, Jens Freimann wrote:
In virtio_pq_send_command() we check for a used descriptor
and wait in an idle loop until it becomes used. We can't use
vq->used_wrap_counter here to check for the first descriptor
we made available because the ring could have wrapped. Let's use
the used_wrap_counter that matches the state of the head descriptor.
Fixes: ec194c2 ("net/virtio: support packed queue in send command")
Signed-off-by: Jens Freimann <[email protected]>
---
drivers/net/virtio/virtio_ethdev.c | 11 ++++++-----
drivers/net/virtio/virtqueue.h | 10 ++++++++--
2 files changed, 14 insertions(+), 7 deletions(-)
Reviewed-by: Maxime Coquelin <[email protected]>
Thanks,
Maxime