[ovs-dev,09/13] dpif: Reorder elements in dpif_flow_put structure.

Message ID 1504893565-110166-10-git-send-email-bhanuprakash.bodireddy@intel.com
State New
Headers show
Series
  • Rearrange structure members for memory efficiency.
Related show

Commit Message

Bodireddy, Bhanuprakash Sept. 8, 2017, 5:59 p.m.
By reordering elements in dpif_flow_put structure, holes can be removed.

Before: structure size: 80, sum holes: 8, cachelines:2
After : structure size: 72, sum holes: 0, cachelines:2

Signed-off-by: Bhanuprakash Bodireddy <bhanuprakash.bodireddy@intel.com>
---
 lib/dpif.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/lib/dpif.h b/lib/dpif.h
index d9ded8b..bef7845 100644
--- a/lib/dpif.h
+++ b/lib/dpif.h
@@ -638,6 +638,7 @@  enum dpif_op_type {
  */
 struct dpif_flow_put {
     /* Input. */
+    unsigned pmd_id;                /* Datapath poll mode driver id. */
     enum dpif_flow_put_flags flags; /* DPIF_FP_*. */
     const struct nlattr *key;       /* Flow to put. */
     size_t key_len;                 /* Length of 'key' in bytes. */
@@ -646,7 +647,6 @@  struct dpif_flow_put {
     const struct nlattr *actions;   /* Actions to perform on flow. */
     size_t actions_len;             /* Length of 'actions' in bytes. */
     const ovs_u128 *ufid;           /* Optional unique flow identifier. */
-    unsigned pmd_id;                /* Datapath poll mode driver id. */
 
     /* Output. */
     struct dpif_flow_stats *stats;  /* Optional flow statistics. */