diff options
author | Bhanuprakash Bodireddy <bhanuprakash.bodireddy@intel.com> | 2017-09-08 18:59:13 +0100 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2017-11-03 12:41:41 -0700 |
commit | abec9228f17cf3372e22c33c836a4714e10bd773 (patch) | |
tree | 396484abf708e7e5af56a03f185ff49b7f577f37 /ofproto/bond.c | |
parent | afea2e89b9d3b0302ce1c7d5f770d74da87fc756 (diff) | |
download | openvswitch-abec9228f17cf3372e22c33c836a4714e10bd773.tar.gz |
bond: Reorder elements in bond_slave structure.
By reordering elements in bond_slave structure, holes can be removed and
saves a cache line.
Before: structure size: 136, sum holes: 10, cachelines:3
After : structure size: 128, sum holes: 2, cachelines:2
Signed-off-by: Bhanuprakash Bodireddy <bhanuprakash.bodireddy@intel.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ofproto/bond.c')
-rw-r--r-- | ofproto/bond.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ofproto/bond.c b/ofproto/bond.c index 7f98a3eb1..8ecd22c7d 100644 --- a/ofproto/bond.c +++ b/ofproto/bond.c @@ -88,13 +88,13 @@ struct bond_slave { struct netdev *netdev; /* Network device, owned by the client. */ uint64_t change_seq; /* Tracks changes in 'netdev'. */ - ofp_port_t ofp_port; /* OpenFlow port number. */ char *name; /* Name (a copy of netdev_get_name(netdev)). */ + ofp_port_t ofp_port; /* OpenFlow port number. */ /* Link status. */ - long long delay_expires; /* Time after which 'enabled' may change. */ bool enabled; /* May be chosen for flows? */ bool may_enable; /* Client considers this slave bondable. */ + long long delay_expires; /* Time after which 'enabled' may change. */ /* Rebalancing info. Used only by bond_rebalance(). */ struct ovs_list bal_node; /* In bond_rebalance()'s 'bals' list. */ |