Netmap: Fix Netmap Polling Issue 61/1861/3
authorMohsin KAZMI <sykazmi@cisco.com>
Wed, 6 Jul 2016 01:17:50 +0000 (03:17 +0200)
committerDamjan Marion <dmarion.lists@gmail.com>
Wed, 6 Jul 2016 20:43:15 +0000 (20:43 +0000)
commit64f450da8f375e000f139fe1c8f7071dac37af29
tree89fd977fee86d1e154eb16ac9ba1744e0cddd1bb
parent2e95f5a1d12d50b8b394d59b379fb36899e6d0fe
Netmap: Fix Netmap Polling Issue

Previously, netmap node switched from interrupt to polling if
worker threads are enabled even if there was no netmap interface
running. Netmap input node consumed CPU cycles because of input
node calls but these cycles were wasted as input node did not have
any packet to process.

This patch fixes issue stated above using more intelligent way of enabling
or disabling polling based on interfaces count. But the pre-requisite
condition for polling is, worker thread(s) should be enabled.

Change-Id: I3a901823c7b040cce3393958981f439b9f290fe5
Signed-off-by: Mohsin KAZMI <sykazmi@cisco.com>
vnet/vnet/devices/netmap/netmap.c