mirror of
https://github.com/openvswitch/ovs
synced 2025-08-22 09:58:01 +00:00
ofproto-dpif-xlate: Eliminate 'rule' local variable.
This variable was only used as a temporary within a small scope, so it worked just as well to just use ctx.rule there instead. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
This commit is contained in:
parent
d4d3f33e55
commit
b2e89cc94e
@ -4738,7 +4738,6 @@ xlate_actions(struct xlate_in *xin, struct xlate_out *xout)
|
||||
}
|
||||
|
||||
struct flow *flow = &xin->flow;
|
||||
struct rule_dpif *rule = NULL;
|
||||
|
||||
union mf_subvalue stack_stub[1024 / sizeof(union mf_subvalue)];
|
||||
uint64_t action_set_stub[1024 / 8];
|
||||
@ -4907,25 +4906,22 @@ xlate_actions(struct xlate_in *xin, struct xlate_out *xout)
|
||||
ctx.tables_version = ofproto_dpif_get_tables_version(ctx.xbridge->ofproto);
|
||||
|
||||
if (!xin->ofpacts && !ctx.rule) {
|
||||
rule = rule_dpif_lookup_from_table(ctx.xbridge->ofproto,
|
||||
ctx.tables_version, flow, xin->wc,
|
||||
ctx.xin->xcache != NULL,
|
||||
ctx.xin->resubmit_stats,
|
||||
&ctx.table_id,
|
||||
flow->in_port.ofp_port, true, true);
|
||||
ctx.rule = rule_dpif_lookup_from_table(
|
||||
ctx.xbridge->ofproto, ctx.tables_version, flow, xin->wc,
|
||||
ctx.xin->xcache != NULL, ctx.xin->resubmit_stats, &ctx.table_id,
|
||||
flow->in_port.ofp_port, true, true);
|
||||
if (ctx.xin->resubmit_stats) {
|
||||
rule_dpif_credit_stats(rule, ctx.xin->resubmit_stats);
|
||||
rule_dpif_credit_stats(ctx.rule, ctx.xin->resubmit_stats);
|
||||
}
|
||||
if (ctx.xin->xcache) {
|
||||
struct xc_entry *entry;
|
||||
|
||||
entry = xlate_cache_add_entry(ctx.xin->xcache, XC_RULE);
|
||||
entry->u.rule = rule;
|
||||
entry->u.rule = ctx.rule;
|
||||
}
|
||||
ctx.rule = rule;
|
||||
|
||||
if (OVS_UNLIKELY(ctx.xin->resubmit_hook)) {
|
||||
ctx.xin->resubmit_hook(ctx.xin, rule, 0);
|
||||
ctx.xin->resubmit_hook(ctx.xin, ctx.rule, 0);
|
||||
}
|
||||
}
|
||||
xout->fail_open = ctx.rule && rule_dpif_is_fail_open(ctx.rule);
|
||||
|
Loading…
x
Reference in New Issue
Block a user