vhost: support interrupt mode 64/5764/6
authorSteven <sluong@cisco.com>
Thu, 16 Mar 2017 04:18:55 +0000 (21:18 -0700)
committerDamjan Marion <dmarion.lists@gmail.com>
Wed, 22 Mar 2017 08:54:33 +0000 (08:54 +0000)
commit7312cc7785a9d1198519e1091a645fecc019a6b8
tree7f46d3e5b36c766949ddfc37329cffeeebcc7323
parentb616e9fdc270e786c31b9ee9de5464497f0b1f6d
vhost: support interrupt mode

vhost currently supports only polling mode. This patch is to add
interrupt mode. When the interface is configured for interrupt
mode, our input node does not get called unless there is a packet
in the vring.

If a particular CPU has one interface configured for polling mode
and another in interrupt, the input node is set to polling for
that CPU.

This diffs also includes two crashes in vlib's dispatch_node. One is
included in https://gerrit.fd.io/r/#/c/5516. The other crash is in
the ASSERT. The ASSERT can become true when the caller of
dispatch_node is in a loop. The first call converted the node
to polling. The second call thereafter will hit the ASSERT.

Change-Id: If17b6d48b20d7d8605c6a161459828637173cd32
Signed-off-by: Steven <sluong@cisco.com>
src/vat/api_format.c
src/vlib/main.c
src/vnet/devices/virtio/vhost-user.c
src/vnet/devices/virtio/vhost-user.h