vhost: introduce reply ack feature
authorMaxime Coquelin <maxime.coquelin@redhat.com>
Mon, 12 Dec 2016 17:54:00 +0000 (18:54 +0100)
committerYuanhan Liu <yuanhan.liu@linux.intel.com>
Tue, 17 Jan 2017 08:20:18 +0000 (09:20 +0100)
commit73c8f9f69c6ce07fe461574572e4f08e7db0cb70
treedd9c0848df47ebe7e219f31aa53b85a7aa84a27c
parentb3bee7d87d4abd01dd7a1d4163f2994f31487343
vhost: introduce reply ack feature

REPLY_ACK features provide a generic way for QEMU to ensure both
completion and success of a request.

As described in vhost-user spec in QEMU repository, QEMU sets
VHOST_USER_NEED_REPLY flag (bit 3) when expecting a reply_ack from
the backend. Backend must reply with 0 for success or non-zero
otherwise when flag is set.

Currently, only VHOST_USER_SET_MEM_TABLE request implements reply_ack,
in order to synchronize mapping updates.

This patch enables REPLY_ACK feature generally, but only checks error
code for VHOST_USER_SET_MEM_TABLE.

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