vhost: avoid function call in data path
authorJianfeng Tan <jianfeng.tan@intel.com>
Wed, 14 Feb 2018 04:01:00 +0000 (05:01 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 30 Mar 2018 12:08:42 +0000 (14:08 +0200)
commitae034edaa6c05149bde923237ba1bdb3c94e1e2b
tree9a48b3f2dae411e5155b8658877ff2de2c06476b
parentbdf78f9f24058f6dbaf98e9327796e003275a8a8
vhost: avoid function call in data path

Previously, get_device() is a function call. It's OK for slow path
configuration, but takes some cycles for data path.

To avoid that, we turn this function to inline type.

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
lib/librte_vhost/vhost.c
lib/librte_vhost/vhost.h