summaryrefslogtreecommitdiff
path: root/lib/ofp-parse.c
diff options
context:
space:
mode:
authorJarno Rajahalme <jrajahalme@nicira.com>2014-04-29 15:50:38 -0700
committerJarno Rajahalme <jrajahalme@nicira.com>2014-04-29 15:50:38 -0700
commitdc723c447a797e555d400594133a35b9841eb1de (patch)
treeb59061c192bfb876eafc8af277c5b1ae4fe9a2f6 /lib/ofp-parse.c
parent0d593ee424de4bb9e3d4dbe7d81c126a4efaa267 (diff)
downloadopenvswitch-dc723c447a797e555d400594133a35b9841eb1de.tar.gz
ofproto: Inline actions in struct rule_actions.
Allocate struct rule_actions and the space for the actions at once. This reduces one memory indirection and helps reduce cache misses visible in perf annotations. Fix some old comments referring to ref count, since we now use RCU for this. Enforce constness of the actions that are assigned from rule_actions throughout the code. Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'lib/ofp-parse.c')
-rw-r--r--lib/ofp-parse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ofp-parse.c b/lib/ofp-parse.c
index d2500427e..c759f036b 100644
--- a/lib/ofp-parse.c
+++ b/lib/ofp-parse.c
@@ -1924,7 +1924,7 @@ parse_ofp_flow_mod_file(const char *file_name, uint16_t command,
size_t i;
for (i = 0; i < *n_fms; i++) {
- free((*fms)[i].ofpacts);
+ free(CONST_CAST(struct ofpact *, (*fms)[i].ofpacts));
}
free(*fms);
*fms = NULL;