vhost: use SMP memory barrier before kicking guest
authorMaxime Coquelin <maxime.coquelin@redhat.com>
Thu, 7 Jun 2018 14:38:26 +0000 (16:38 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 15 Jun 2018 10:27:25 +0000 (12:27 +0200)
commit63b113afa51f223325642705685d3f1004cfdcaa
treedad579973d1f51c24f8a9d673102bc3d725df51b
parent2396806765e4b797dd30bc265126c2bbc1a879cc
vhost: use SMP memory barrier before kicking guest

vhost_vring_call() used rte_mb(), which translates into
mfence instruction on x86.

This patch changes to use rte_smp_mb(), which changed recently
to translate into a locked ADD instruction for performance
reason.

The measured gain is up to 3% with the testpmd benchmarks.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
lib/librte_vhost/vhost.h