[dpdk-dev] [PATCH] vhost: flush used->idx update before reading avail->flags

Luke Gorrie luke at snabb.co
Wed Jun 10 10:30:01 CEST 2015


On 9 June 2015 at 10:46, Michael S. Tsirkin <mst at redhat.com> wrote:

> By the way, similarly, host side must re-check avail idx after writing
> used flags. I don't see where snabbswitch does it - is that a bug
> in snabbswitch?


Good question.

Snabb Switch does not use interrupts from the guest. We always set
VRING_F_NO_NOTIFY to tell the guest that it need not interrupt us. Then we
run in poll mode and in practice check the avail ring for new descriptors
every 20us or so.

So the argument for not needing this check in both Snabb Switch and DPDK is
that we are running poll mode and don't notice whether interrupts are being
sent or not.

Is that a solid argument or do I misunderstand what the race condition is?

Cheers,
-Luke


More information about the dev mailing list