uint32_t sflow_odp_port; /* Output port for composing sFlow action. */
uint16_t user_cookie_offset;/* Used for user_action_cookie fixup. */
bool exit; /* No further actions should be processed. */
- struct flow orig_flow; /* Copy of original flow. */
};
static void action_xlate_ctx_init(struct action_xlate_ctx *,
struct timer next_expiration;
struct hmap odp_to_ofport_map; /* ODP port to ofport mapping. */
- struct sset tnl_backers; /* Set of dpif ports backing tunnels. */
+ struct simap tnl_backers; /* Set of dpif ports backing tunnels. */
/* Facet revalidation flags applying to facets which use this backer. */
enum revalidate_reason need_revalidate; /* Revalidate every facet. */
HMAP_FOR_EACH (ofproto, all_ofproto_dpifs_node,
&all_ofproto_dpifs) {
- if (sset_contains(&ofproto->backer->tnl_backers, devname)) {
+ if (simap_contains(&ofproto->backer->tnl_backers, devname)) {
goto next;
}
}
drop_key_clear(backer);
hmap_destroy(&backer->drop_keys);
- sset_destroy(&backer->tnl_backers);
+ simap_destroy(&backer->tnl_backers);
hmap_destroy(&backer->odp_to_ofport_map);
node = shash_find(&all_dpif_backers, backer->type);
free(backer->type);
hmap_init(&backer->drop_keys);
timer_set_duration(&backer->next_expiration, 1000);
backer->need_revalidate = 0;
- sset_init(&backer->tnl_backers);
+ simap_init(&backer->tnl_backers);
tag_set_init(&backer->revalidate_set);
*backerp = backer;
* assumes that removal of attached ports will happen as part of
* destruction. */
dpif_port_del(ofproto->backer->dpif, port->odp_port);
- sset_find_and_delete(&ofproto->backer->tnl_backers, dp_port_name);
+ simap_find_and_delete(&ofproto->backer->tnl_backers, dp_port_name);
}
if (port->odp_port != OVSP_NONE && !port->tnl_port) {
}
if (!dpif_port_exists(ofproto->backer->dpif, dp_port_name)) {
- int error = dpif_port_add(ofproto->backer->dpif, netdev, NULL);
+ uint32_t port_no = UINT32_MAX;
+ int error;
+
+ error = dpif_port_add(ofproto->backer->dpif, netdev, &port_no);
if (error) {
return error;
}
+ if (netdev_get_tunnel_config(netdev)) {
+ simap_put(&ofproto->backer->tnl_backers, dp_port_name, port_no);
+ }
}
if (netdev_get_tunnel_config(netdev)) {
sset_add(&ofproto->ghost_ports, devname);
- sset_add(&ofproto->backer->tnl_backers, dp_port_name);
} else {
sset_add(&ofproto->ports, devname);
}
* from the bond. The client will need to reconfigure everything
* after deleting ports, so then the slave will get re-added. */
dpif_port = netdev_vport_get_dpif_port(ofport->up.netdev);
- sset_find_and_delete(&ofproto->backer->tnl_backers, dpif_port);
+ simap_find_and_delete(&ofproto->backer->tnl_backers, dpif_port);
bundle_remove(&ofport->up);
}
}
enum slow_path_reason special;
struct ofport_dpif *in_port;
+ struct flow orig_flow;
COVERAGE_INC(ofproto_dpif_xlate);
if (ctx->ofproto->has_mirrors || hit_resubmit_limit) {
/* Do this conditionally because the copy is expensive enough that it
- * shows up in profiles.
- *
- * We keep orig_flow in 'ctx' only because I couldn't make GCC 4.4
- * believe that I wasn't using it without initializing it if I kept it
- * in a local variable. */
- ctx->orig_flow = ctx->flow;
+ * shows up in profiles. */
+ orig_flow = ctx->flow;
}
if (ctx->flow.nw_frag & FLOW_NW_FRAG_ANY) {
} else if (!VLOG_DROP_ERR(&trace_rl)) {
struct ds ds = DS_EMPTY_INITIALIZER;
- ofproto_trace(ctx->ofproto, &ctx->orig_flow, ctx->packet,
+ ofproto_trace(ctx->ofproto, &orig_flow, ctx->packet,
initial_tci, &ds);
VLOG_ERR("Trace triggered by excessive resubmit "
"recursion:\n%s", ds_cstr(&ds));
}
}
if (ctx->ofproto->has_mirrors) {
- add_mirror_actions(ctx, &ctx->orig_flow);
+ add_mirror_actions(ctx, &orig_flow);
}
fix_sflow_action(ctx);
}