lib/vconn-passive.man:
lib/vlog.man:
+utilities/ovs-dpctl-top.8: \
+ utilities/ovs-dpctl-top.8.in
+utilities/ovs-dpctl-top.8.in:
+
utilities/ovs-dpctl.8: \
utilities/ovs-dpctl.8.in \
lib/common.man \
lib/common.man:
lib/vlog.man:
-utilities/ovs-dpctl-top.8: \
- utilities/ovs-dpctl-top.8.in
-utilities/ovs-dpctl-top.8.in:
-
utilities/ovs-l3ping.8: \
utilities/ovs-l3ping.8.in \
lib/common-syn.man \
execute_flow_miss(struct flow_miss *miss, struct dpif_op *ops, size_t *n_ops)
{
struct ofproto_dpif *ofproto = miss->ofproto;
- struct flow_wildcards wc;
- struct rule_dpif *rule;
struct ofpbuf *packet;
struct xlate_in xin;
miss->stats.n_packets++;
}
- flow_wildcards_init_catchall(&wc);
- rule_dpif_lookup(ofproto, &miss->flow, &wc, &rule);
- rule_dpif_credit_stats(rule, &miss->stats);
- xlate_in_init(&xin, ofproto, &miss->flow, rule, miss->stats.tcp_flags,
+ xlate_in_init(&xin, ofproto, &miss->flow, NULL, miss->stats.tcp_flags,
NULL);
xin.may_learn = true;
xin.resubmit_stats = &miss->stats;
xlate_actions(&xin, &miss->xout);
- flow_wildcards_or(&miss->xout.wc, &miss->xout.wc, &wc);
- if (rule_dpif_fail_open(rule)) {
+ if (miss->xout.fail_open) {
LIST_FOR_EACH (packet, list_node, &miss->packets) {
struct ofputil_packet_in *pin;
LIST_FOR_EACH (packet, list_node, &miss->packets) {
struct xlate_in xin;
- xlate_in_init(&xin, miss->ofproto, &miss->flow, rule, 0, packet);
+ xlate_in_init(&xin, miss->ofproto, &miss->flow, NULL, 0, packet);
xlate_actions_for_side_effects(&xin);
}
}
- rule_dpif_unref(rule);
if (miss->xout.odp_actions.size) {
LIST_FOR_EACH (packet, list_node, &miss->packets) {
{
struct flow_wildcards *wc = &xout->wc;
struct flow *flow = &xin->flow;
+ struct rule_dpif *rule = NULL;
struct rule_actions *actions = NULL;
enum slow_path_reason special;
ctx.table_id = 0;
ctx.exit = false;
+ if (!xin->ofpacts && !ctx.rule) {
+ rule_dpif_lookup(ctx.xbridge->ofproto, flow, wc, &rule);
+ if (ctx.xin->resubmit_stats) {
+ rule_dpif_credit_stats(rule, ctx.xin->resubmit_stats);
+ }
+ ctx.rule = rule;
+ }
+ xout->fail_open = ctx.rule && rule_dpif_fail_open(ctx.rule);
+
if (xin->ofpacts) {
ofpacts = xin->ofpacts;
ofpacts_len = xin->ofpacts_len;
- } else if (xin->rule) {
- actions = rule_dpif_get_actions(xin->rule);
+ } else if (ctx.rule) {
+ actions = rule_dpif_get_actions(ctx.rule);
ofpacts = actions->ofpacts;
ofpacts_len = actions->ofpacts_len;
} else {
out:
ovs_rwlock_unlock(&xlate_rwlock);
+ rule_dpif_unref(rule);
rule_actions_unref(actions);
}
struct flow_wildcards wc;
enum slow_path_reason slow; /* 0 if fast path may be used. */
+ bool fail_open; /* Initial rule is fail open? */
bool has_learn; /* Actions include NXAST_LEARN? */
bool has_normal; /* Actions output to OFPP_NORMAL? */
bool has_fin_timeout; /* Actions include NXAST_FIN_TIMEOUT? */
* not if we are just revalidating. */
bool may_learn;
- /* The rule initiating translation or NULL. */
+ /* The rule initiating translation or NULL. If both 'rule' and 'ofpacts'
+ * are NULL, xlate_actions() will do the initial rule lookup itself. */
struct rule_dpif *rule;
/* The actions to translate. If 'rule' is not NULL, these may be NULL. */
struct xlate_out xout;
struct xlate_in xin;
-
- struct rule_dpif *rule;
bool ok;
/* Check the datapath actions for consistency. */
- rule_dpif_lookup(facet->ofproto, &facet->flow, NULL, &rule);
- xlate_in_init(&xin, facet->ofproto, &facet->flow, rule, 0, NULL);
+ xlate_in_init(&xin, facet->ofproto, &facet->flow, NULL, 0, NULL);
xlate_actions(&xin, &xout);
- rule_dpif_unref(rule);
ok = ofpbuf_equal(&facet->xout.odp_actions, &xout.odp_actions)
&& facet->xout.slow == xout.slow;
struct dpif_flow_stats *stats, bool may_learn)
{
struct ofport_dpif *in_port;
- struct rule_dpif *rule;
struct xlate_in xin;
in_port = get_ofp_port(ofproto, flow->in_port.ofp_port);
netdev_vport_inc_rx(in_port->up.netdev, stats);
}
- rule_dpif_lookup(ofproto, flow, NULL, &rule);
- rule_dpif_credit_stats(rule, stats);
- xlate_in_init(&xin, ofproto, flow, rule, stats->tcp_flags, NULL);
+ xlate_in_init(&xin, ofproto, flow, NULL, stats->tcp_flags, NULL);
xin.resubmit_stats = stats;
xin.may_learn = may_learn;
xlate_actions_for_side_effects(&xin);
- rule_dpif_unref(rule);
}
static void