From 978788903b54a9ecdab045c67f94c4ba79633a9f Mon Sep 17 00:00:00 2001 From: Steven Date: Tue, 29 Aug 2017 09:23:26 -0700 Subject: 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 --- src/vnet/devices/virtio/vhost-user.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/vnet/devices/virtio/vhost-user.h') 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; -- cgit 1.2.3-korg