projects
/
cascardo
/
ovs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ofpbuf: New function ofpbuf_const_initializer().
[cascardo/ovs.git]
/
ofproto
/
ofproto-dpif-xlate.c
diff --git
a/ofproto/ofproto-dpif-xlate.c
b/ofproto/ofproto-dpif-xlate.c
index
37f2879
..
e7b37a9
100644
(file)
--- a/
ofproto/ofproto-dpif-xlate.c
+++ b/
ofproto/ofproto-dpif-xlate.c
@@
-3335,19
+3335,17
@@
static void
xlate_group_bucket(struct xlate_ctx *ctx, struct ofputil_bucket *bucket)
{
uint64_t action_list_stub[1024 / 8];
xlate_group_bucket(struct xlate_ctx *ctx, struct ofputil_bucket *bucket)
{
uint64_t action_list_stub[1024 / 8];
- struct ofpbuf action_list, action_set;
+ struct ofpbuf action_list = OFPBUF_STUB_INITIALIZER(action_list_stub);
+ struct ofpbuf action_set = ofpbuf_const_initializer(bucket->ofpacts,
+ bucket->ofpacts_len);
struct flow old_flow = ctx->xin->flow;
bool old_was_mpls = ctx->was_mpls;
struct flow old_flow = ctx->xin->flow;
bool old_was_mpls = ctx->was_mpls;
- ofpbuf_use_const(&action_set, bucket->ofpacts, bucket->ofpacts_len);
- ofpbuf_use_stub(&action_list, action_list_stub, sizeof action_list_stub);
-
ofpacts_execute_action_set(&action_list, &action_set);
ctx->recurse++;
do_xlate_actions(action_list.data, action_list.size, ctx);
ctx->recurse--;
ofpacts_execute_action_set(&action_list, &action_set);
ctx->recurse++;
do_xlate_actions(action_list.data, action_list.size, ctx);
ctx->recurse--;
- ofpbuf_uninit(&action_set);
ofpbuf_uninit(&action_list);
/* Check if need to recirculate. */
ofpbuf_uninit(&action_list);
/* Check if need to recirculate. */