aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/virtio/vhost-user.h
diff options
context:
space:
mode:
authorSteven <sluong@cisco.com>2017-08-29 09:23:26 -0700
committerFlorin Coras <florin.coras@gmail.com>2017-08-30 06:56:39 +0000
commit978788903b54a9ecdab045c67f94c4ba79633a9f (patch)
tree7bc9e10950509422ecf12a1be5871fbabf03e144 /src/vnet/devices/virtio/vhost-user.h
parenta894434e30149338f2aa36773cf80ec1cf15a34f (diff)
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>
Diffstat (limited to 'src/vnet/devices/virtio/vhost-user.h')
-rw-r--r--src/vnet/devices/virtio/vhost-user.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vnet/devices/virtio/vhost-user.h b/src/vnet/devices/virtio/vhost-user.h
index ed147a470d2..ad6c4219706 100644
--- a/src/vnet/devices/virtio/vhost-user.h
+++ b/src/vnet/devices/virtio/vhost-user.h
@@ -191,7 +191,7 @@ typedef struct vhost_user_msg {
typedef struct
{
CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);
- u16 qsz;
+ u16 qsz_mask;
u16 last_avail_idx;
u16 last_used_idx;
u16 n_since_last_int;