vhost: fix async callback return type
authorPatrick Fu <patrick.fu@intel.com>
Thu, 23 Jul 2020 05:39:06 +0000 (13:39 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 29 Jul 2020 22:41:23 +0000 (00:41 +0200)
commit819a716858264d6c90f554e4fe53740b42c4c893
treea5ffe6afad95fda1273c65bcfe3d2dd8945fc6d7
parent362f06f9a430d65e96a8bb8e972570bedd3ece5d
vhost: fix async callback return type

The async copy device callbacks are used by async APIs to transfer data
and check completion status. Async APIs return the number of packets
successfully processed to the caller applications and no error
(negative) value is allowed for API return value. Thus, negative return
values from async device callbacks don't have meaningful usage, while
adding overhead in checking the return value validity. This patch change
the callback return values from "int" to "uint32_t" to get aligned with
async API definition.

Fixes: 78639d54563a ("vhost: introduce async enqueue registration API")

Signed-off-by: Patrick Fu <patrick.fu@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
lib/librte_vhost/rte_vhost_async.h