vhost: Cache qsz_mask instead of qsz in vhost_user_vring_t 38/8238/3
authorSteven <sluong@cisco.com>
Tue, 29 Aug 2017 16:23:26 +0000 (09:23 -0700)
committerFlorin Coras <florin.coras@gmail.com>
Wed, 30 Aug 2017 06:56:39 +0000 (06:56 +0000)
commit978788903b54a9ecdab045c67f94c4ba79633a9f
tree7bc9e10950509422ecf12a1be5871fbabf03e144
parenta894434e30149338f2aa36773cf80ec1cf15a34f
vhost: Cache qsz_mask instead of qsz in vhost_user_vring_t

In the data path, we grab qsz from vhost_user_vring_t to compute
qsz_mask and store it in a stack variable to use on many occasions.
We never use qsz for any meaningful purpose. It is more useful to
cache qsz_mask in vhost_user_vring_t to avoid the needless computation
in the data path.

Change-Id: Idf4d94a9754d5c75c899f1f4f59602275b9904a6
Signed-off-by: Steven <sluong@cisco.com>
src/vnet/devices/virtio/vhost-user.c
src/vnet/devices/virtio/vhost-user.h