On 01/09/2018 12:03 PM, Junjie Chen wrote:
The driver can suppress interrupt when VIRTIO_F_EVENT_IDX feature bit is
negotiated. The driver set vring flags to 0, and MAY use used_event in
available ring to advise device interrupt util reach an index specified
by used_event. The device ignore the lower bit of vring flags, and send
an interrupt when index reach used_event.

The device can suppress notification in a manner analogous to the ways
driver suppress interrupt. The device manipulates flags or avail_event in
the used ring in the same way the driver manipulates flags or used_event in
available ring.

Signed-off-by: Junjie Chen<junjie.j.c...@intel.com>
---
v7:
Add vhost_need_event definition and update code for next virtio.

v6:
Use volatile qualifier to access avail event idx.

v5:
Remove updating avail event index in backend.

v2-v4:
Use definition of VIRTIO_F_EVENT_IDX from kernel.

  lib/librte_vhost/vhost.c      |  2 +-
  lib/librte_vhost/vhost.h      | 44 ++++++++++++++++++++++++++++++++++++++-----
  lib/librte_vhost/virtio_net.c |  6 +++---
  3 files changed, 43 insertions(+), 9 deletions(-)

Reviewed-by: Maxime Coquelin <maxime.coque...@redhat.com>

Thanks,
Maxime

Reply via email to