summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBhanuprakash Bodireddy <bhanuprakash.bodireddy@intel.com>2016-10-14 15:37:11 +0100
committerDaniele Di Proietto <diproiettod@vmware.com>2016-10-17 18:35:03 -0700
commit2e4450aa35c6e7a9c97c930f5d43028cfbfbe07f (patch)
treedc1a1149fb5c425588f29b9f351ab9c986d8814a /lib
parent38ee0814978c620bfa2ba5ee1069d8b42ff9de95 (diff)
downloadopenvswitch-2e4450aa35c6e7a9c97c930f5d43028cfbfbe07f.tar.gz
dpif-netdev: Reorder elements in dp_netdev_port structure.
By reordering the data elements in dp_netdev_port structure, pad bytes can be reduced and there by saving a cache line. Before: structure size:136, holes:3, sum padbytes:15, cachelines:3 After: structure size:128, holes:2, sum padbytes:7, cachelines:2 Signed-off-by: Bhanuprakash Bodireddy <bhanuprakash.bodireddy@intel.com> Co-authored-by: Antonio Fischetti <antonio.fischetti@intel.com> Signed-off-by: Antonio Fischetti <antonio.fischetti@intel.com> Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/dpif-netdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 10cc55c06..8fd98baeb 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -290,8 +290,8 @@ struct dp_netdev_port {
struct netdev *netdev;
struct hmap_node node; /* Node in dp_netdev's 'ports'. */
struct netdev_saved_flags *sf;
- unsigned n_rxq; /* Number of elements in 'rxq' */
struct dp_netdev_rxq *rxqs;
+ unsigned n_rxq; /* Number of elements in 'rxq' */
bool dynamic_txqs; /* If true XPS will be used. */
unsigned *txq_used; /* Number of threads that uses each tx queue. */
struct ovs_mutex txq_used_mutex;