vhost: make page logging atomic
authorTiwei Bie <tiwei.bie@intel.com>
Tue, 1 Aug 2017 09:01:21 +0000 (17:01 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 3 Aug 2017 20:09:48 +0000 (22:09 +0200)
commit897f13a1f726cefdc68762da83f9d2225a85c27e
treee8c0414111cb760affa8b0fc2a25acca8aebe336
parent7b681637d26eb91c1253c03e3d0268a7e3e29b66
vhost: make page logging atomic

Each dirty page logging operation should be atomic. But it's not
atomic in current implementation. So it's possible that some dirty
pages can't be logged successfully when different threads try to
log different pages into the same byte of the log buffer concurrently.
This patch fixes this issue.

Fixes: b171fad1ffa5 ("vhost: log used vring changes")
Cc: stable@dpdk.org
Reported-by: Xiao Wang <xiao.w.wang@intel.com>
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
lib/librte_vhost/vhost.h