Skip to content

Commit

Permalink
netdev: Reorder elements in netdev_tunnel_config structure.
Browse files Browse the repository at this point in the history
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@intel.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
  • Loading branch information
Bhanuprakash Bodireddy authored and blp committed Nov 3, 2017
1 parent 7a38599 commit fea6740
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/netdev.h
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit fea6740

Please sign in to comment.