By reordering elements in netdev structure, holes can be removed. Before: structure size: 88, sum holes: 10, cachelines:2 After : structure size: 80, sum holes: 2, cachelines:2
Signed-off-by: Bhanuprakash Bodireddy <[email protected]> --- lib/netdev-provider.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/netdev-provider.h b/lib/netdev-provider.h index 5d7bd4f..1720deb 100644 --- a/lib/netdev-provider.h +++ b/lib/netdev-provider.h @@ -49,6 +49,12 @@ struct netdev { * opening this device, and therefore got assigned to the "system" class */ bool auto_classified; + /* If this is 'true', the user explicitly specified an MTU for this + * netdev. Otherwise, Open vSwitch is allowed to override it. */ + bool mtu_user_config; + + int ref_cnt; /* Times this devices was opened. */ + /* A sequence number which indicates changes in one of 'netdev''s * properties. It must be nonzero so that users have a value which * they may use as a reset when tracking 'netdev'. @@ -67,16 +73,11 @@ struct netdev { struct seq *reconfigure_seq; uint64_t last_reconfigure_seq; - /* If this is 'true', the user explicitly specified an MTU for this - * netdev. Otherwise, Open vSwitch is allowed to override it. */ - bool mtu_user_config; - /* The core netdev code initializes these at netdev construction and only * provide read-only access to its client. Netdev implementations may * modify them. */ int n_txq; int n_rxq; - int ref_cnt; /* Times this devices was opened. */ struct shash_node *node; /* Pointer to element in global map. */ struct ovs_list saved_flags_list; /* Contains "struct netdev_saved_flags". */ }; -- 2.4.11 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
