struct group_table *group_table,
const struct simap *ct_zones,
struct hmap *dhcp_opts_p,
- uint32_t *conj_id_ofs_p,
- struct hmap *flow_table);
+ uint32_t *conj_id_ofs_p);
static bool
lookup_port_cb(const void *aux_, const char *port_name, unsigned int *portp)
}
-/* Adds the logical flows from the Logical_Flow table to 'flow_table'. */
+/* Adds the logical flows from the Logical_Flow table to flow tables. */
static void
add_logical_flows(struct controller_ctx *ctx, const struct lport_index *lports,
const struct mcgroup_index *mcgroups,
const struct hmap *local_datapaths,
const struct hmap *patched_datapaths,
struct group_table *group_table,
- const struct simap *ct_zones, struct hmap *flow_table)
+ const struct simap *ct_zones)
{
uint32_t conj_id_ofs = 1;
SBREC_LOGICAL_FLOW_FOR_EACH (lflow, ctx->ovnsb_idl) {
consider_logical_flow(lports, mcgroups, lflow, local_datapaths,
patched_datapaths, group_table, ct_zones,
- &dhcp_opts, &conj_id_ofs, flow_table);
+ &dhcp_opts, &conj_id_ofs);
}
dhcp_opts_destroy(&dhcp_opts);
struct group_table *group_table,
const struct simap *ct_zones,
struct hmap *dhcp_opts_p,
- uint32_t *conj_id_ofs_p,
- struct hmap *flow_table)
+ uint32_t *conj_id_ofs_p)
{
/* Determine translation of logical table IDs to physical table IDs. */
bool ingress = !strcmp(lflow->pipeline, "ingress");
m->match.flow.conj_id += *conj_id_ofs_p;
}
if (!m->n) {
- ofctrl_add_flow(flow_table, ptable, lflow->priority,
- &m->match, &ofpacts);
+ ofctrl_add_flow(ptable, lflow->priority, &m->match, &ofpacts,
+ &lflow->header_.uuid);
} else {
uint64_t conj_stubs[64 / 8];
struct ofpbuf conj;
dst->clause = src->clause;
dst->n_clauses = src->n_clauses;
}
- ofctrl_add_flow(flow_table, ptable, lflow->priority,
- &m->match, &conj);
+ ofctrl_add_flow(ptable, lflow->priority, &m->match, &conj,
+ &lflow->header_.uuid);
+ ofpbuf_uninit(&conj);
ofpbuf_uninit(&conj);
}
}
}
static void
-consider_neighbor_flow(struct hmap *flow_table,
- const struct lport_index *lports,
+consider_neighbor_flow(const struct lport_index *lports,
const struct sbrec_mac_binding *b,
struct ofpbuf *ofpacts_p,
struct match *match_p)
ofpbuf_clear(ofpacts_p);
put_load(mac.ea, sizeof mac.ea, MFF_ETH_DST, 0, 48, ofpacts_p);
- ofctrl_add_flow(flow_table, OFTABLE_MAC_BINDING, 100, match_p, ofpacts_p);
+ ofctrl_add_flow(OFTABLE_MAC_BINDING, 100, match_p, ofpacts_p,
+ &b->header_.uuid);
}
-/* Adds an OpenFlow flow to 'flow_table' for each MAC binding in the OVN
+/* Adds an OpenFlow flow to flow tables for each MAC binding in the OVN
* southbound database, using 'lports' to resolve logical port names to
* numbers. */
static void
add_neighbor_flows(struct controller_ctx *ctx,
- const struct lport_index *lports, struct hmap *flow_table)
+ const struct lport_index *lports)
{
struct ofpbuf ofpacts;
struct match match;
const struct sbrec_mac_binding *b;
SBREC_MAC_BINDING_FOR_EACH (b, ctx->ovnsb_idl) {
- consider_neighbor_flow(flow_table, lports, b, &ofpacts, &match);
+ consider_neighbor_flow(lports, b, &ofpacts, &match);
}
ofpbuf_uninit(&ofpacts);
}
const struct hmap *local_datapaths,
const struct hmap *patched_datapaths,
struct group_table *group_table,
- const struct simap *ct_zones, struct hmap *flow_table)
+ const struct simap *ct_zones)
{
update_address_sets(ctx);
add_logical_flows(ctx, lports, mcgroups, local_datapaths,
- patched_datapaths, group_table, ct_zones, flow_table);
- add_neighbor_flows(ctx, lports, flow_table);
+ patched_datapaths, group_table, ct_zones);
+ add_neighbor_flows(ctx, lports);
}
void