[ovs-dev] [PATCH 05/13] netdev: Reorder elements in netdev_tunnel_config structure.

Bhanuprakash Bodireddy bhanuprakash.bodireddy at intel.com
Fri Sep 8 17:59:17 UTC 2017


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

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

Signed-off-by: Bhanuprakash Bodireddy <bhanuprakash.bodireddy at intel.com>
---
 lib/netdev.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/netdev.h b/lib/netdev.h
index f8482f7..3a545fe 100644
--- a/lib/netdev.h
+++ b/lib/netdev.h
@@ -99,9 +99,9 @@ enum netdev_pt_mode {
 
 /* Configuration specific to tunnels. */
 struct netdev_tunnel_config {
+    ovs_be64 in_key;
     bool in_key_present;
     bool in_key_flow;
-    ovs_be64 in_key;
 
     bool out_key_present;
     bool out_key_flow;
@@ -115,8 +115,8 @@ struct netdev_tunnel_config {
     struct in6_addr ipv6_dst;
 
     uint32_t exts;
-    bool set_egress_pkt_mark;
     uint32_t egress_pkt_mark;
+    bool set_egress_pkt_mark;
 
     uint8_t ttl;
     bool ttl_inherit;
-- 
2.4.11



More information about the dev mailing list