vhost: get device once
authorYuanhan Liu <yuanhan.liu@linux.intel.com>
Thu, 18 Aug 2016 08:48:42 +0000 (16:48 +0800)
committerYuanhan Liu <yuanhan.liu@linux.intel.com>
Tue, 13 Sep 2016 03:25:08 +0000 (05:25 +0200)
commitbbd7e83520047d1838163c0eb758c81e3b175393
tree0e08e445da0a2fd57839c92aa79ca996b0b88fdf
parentfc2a9b5b64b1c531b138326185fd1a91d2c81e91
vhost: get device once

Invoke get_device() at the beginning of vhost_user_msg_handler, so that
we could check the return value once. Which could save tons of duplicate
get-and-check device.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
lib/librte_vhost/vhost_user.c