vhost: migrate to use device infra for worker thread assignment, rx-mode. 40/6540/6
authorSteven <sluong@cisco.com>
Mon, 1 May 2017 21:03:02 +0000 (14:03 -0700)
committerSteven <sluong@cisco.com>
Mon, 22 May 2017 23:15:38 +0000 (16:15 -0700)
and add adaptive mode support to receive queue

- Migrate vhost to use device infra which does the interface/queue to worker
thread assignment.

- Retire vhost thread CLI and corresponding code which assigns interface/queue
to worker thread. set interface placement should be used instead to customize
the interface/queue to worker thread assignment.

- Retire vhost interrupt/polling option when creating vhost-user interface.
Instead, set interface rx-mode should be used.

- Add code in vnet_device_input_unassign_thread to change the node state
to interrupt if the last polling interface has left the worker thread for the
device of the corresponding interface/queue.

- Add adaptive mode support. The node state is set to interrupt initially.
When the scheduler detects a burst of traffic, it switches the input node to
polling. Then we inform the device that we don't need interrupt notification.
When the traffic subsides, the scheduler switches the input node back to
interrupt. Then we immediately tell the driver that we want interrupt
notification again.

- Remove some duplicate code in vlib/main.c

Change-Id: Id19bb1b9e50e6521c6464f470f5825c26924d3a8
Signed-off-by: Steven <sluong@cisco.com>

No differences found