vhost: remove vhost-net requirements from generic APIs
authorDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Sun, 24 Feb 2019 23:35:55 +0000 (00:35 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 1 Mar 2019 17:17:36 +0000 (18:17 +0100)
commitc19429844c0257aceb29fdc845dbd16115966986
tree419a7480e28db376816a099108d73ec42ac8687d
parent5c6c1480b3b01c2573cd52a85a01881aaa42b53f
vhost: remove vhost-net requirements from generic APIs

The rte_vhost API to put data into virtqueues operates
on mbufs and hence it is strictly vhost-net specific.
External backends need to implement virtqueue handling
from scratch and that's just not possible without APIs
to get/set vring base addresses.

Those relevant APIs are there, but they have a check that
prevents them from working with any non-vhost-net device.
This patch removes those checks.

rte_vhost_get_log_base() is not necessarily needed for
external backends, as other, higher level vhost APIs for
live migration are available and could be used instead.
We remove the extra check from it anyway for consistency.

Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
lib/librte_vhost/vhost.c