By reordering elements in ofproto_bundle_settings structure, sum holes
and pad bytes can be reduced.

Before: structure size: 96, sum holes: 13, pad bytes: 7, cachelines:2
After : structure size: 80, sum holes:  4, pad bytes: 0, cachelines:2

Signed-off-by: Bhanuprakash Bodireddy <[email protected]>
---
 ofproto/ofproto.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/ofproto/ofproto.h b/ofproto/ofproto.h
index 9e35327..2a7c1f3 100644
--- a/ofproto/ofproto.h
+++ b/ofproto/ofproto.h
@@ -403,18 +403,17 @@ struct ofproto_bundle_settings {
     size_t n_slaves;
 
     enum port_vlan_mode vlan_mode; /* Selects mode for vlan and trunks */
+    bool protected;             /* Protected port mode */
+    bool use_priority_tags;     /* Use 802.1p tag for frames in VLAN 0? */
     uint16_t qinq_ethtype;
     int vlan;                   /* VLAN VID, except for PORT_VLAN_TRUNK. */
     unsigned long *trunks;      /* vlan_bitmap, except for PORT_VLAN_ACCESS. */
     unsigned long *cvlans;
-    bool use_priority_tags;     /* Use 802.1p tag for frames in VLAN 0? */
 
     struct bond_settings *bond; /* Must be nonnull iff if n_slaves > 1. */
 
     struct lacp_settings *lacp;              /* Nonnull to enable LACP. */
     struct lacp_slave_settings *lacp_slaves; /* Array of n_slaves elements. */
-
-    bool protected;             /* Protected port mode */
 };
 
 int ofproto_bundle_register(struct ofproto *, void *aux,
-- 
2.4.11

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to