vhost: arrange struct fields for better cache sharing
authorYuanhan Liu <yuanhan.liu@linux.intel.com>
Tue, 3 May 2016 00:46:18 +0000 (17:46 -0700)
committerYuanhan Liu <yuanhan.liu@linux.intel.com>
Wed, 22 Jun 2016 07:47:12 +0000 (09:47 +0200)
commita66bcad3224008f6fb89755c34533eb5fead166a
tree364adc605551ceb93ec8ecf77c3a65877bae81a6
parent1d41d77cf81c448c1b09e1e859bfd300e2054a98
vhost: arrange struct fields for better cache sharing

The ifname[] field takes so much space, that it seperates some frequently
used fields into different caches, say, features and broadcast_rarp.

This patch moves all those fields that will be accessed frequently in Rx/Tx
together (before the ifname[] field) to let them share one cache line.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: Huawei Xie <huawei.xie@intel.com>
Tested-by: Rich Lane <rich.lane@bigswitch.com>
lib/librte_vhost/vhost-net.h