vhost: fix messages results handling
authorMaxime Coquelin <maxime.coquelin@redhat.com>
Fri, 12 Oct 2018 12:40:29 +0000 (14:40 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 18 Oct 2018 08:24:39 +0000 (10:24 +0200)
commita52ac8ec27fe10b67e479fdfa43f9ca7ad033b23
treef5439cbb5f829b6742c021bd3262a8e4315bf300
parentd0d4887d621f91fb27860a1bc93a17d484443b10
vhost: fix messages results handling

Return of message handling has now changed to an enum that can
take non-negative value that is not zero in case a reply is
needed. But the code checking the variable afterwards has not
been updated, leading to success messages handling being
treated as errors.

External post and pre callbacks return type needs also to be
changed to the new enum, so that its handling is consistent.
This is done in this patch alongside with the convertion of
its only user, vhost-crypto backend.

Fixes: 0bff510b5ea6 ("vhost: unify message handling function signature")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
lib/librte_vhost/vhost.h
lib/librte_vhost/vhost_crypto.c
lib/librte_vhost/vhost_user.c