egress_ifaces sset is no longer used by ovn-controller, so get rid of it Signed-off-by: Lorenzo Bianconi <lorenzo.bianc...@redhat.com> --- controller/binding.c | 40 ------------------------------------- controller/binding.h | 1 - controller/ovn-controller.c | 10 ++-------- 3 files changed, 2 insertions(+), 49 deletions(-)
diff --git a/controller/binding.c b/controller/binding.c index 2fa044b52..673b5a1d8 100644 --- a/controller/binding.c +++ b/controller/binding.c @@ -474,39 +474,6 @@ sbrec_get_port_encap(const struct sbrec_chassis *chassis_rec, return best_encap; } -static void -add_localnet_egress_interface_mappings( - const struct sbrec_port_binding *port_binding, - struct shash *bridge_mappings, struct sset *egress_ifaces) -{ - const char *network = smap_get(&port_binding->options, "network_name"); - if (!network) { - return; - } - - struct ovsrec_bridge *br_ln = shash_find_data(bridge_mappings, network); - if (!br_ln) { - return; - } - - /* Add egress-ifaces from the connected bridge */ - for (size_t i = 0; i < br_ln->n_ports; i++) { - const struct ovsrec_port *port_rec = br_ln->ports[i]; - - for (size_t j = 0; j < port_rec->n_interfaces; j++) { - const struct ovsrec_interface *iface_rec; - - iface_rec = port_rec->interfaces[j]; - bool is_egress_iface = smap_get_bool(&iface_rec->external_ids, - "ovn-egress-iface", false); - if (!is_egress_iface) { - continue; - } - sset_add(egress_ifaces, iface_rec->name); - } - } -} - static bool is_network_plugged(const struct sbrec_port_binding *binding_rec, struct shash *bridge_mappings) @@ -547,7 +514,6 @@ update_ld_multichassis_ports(const struct sbrec_port_binding *binding_rec, static void update_ld_localnet_port(const struct sbrec_port_binding *binding_rec, struct shash *bridge_mappings, - struct sset *egress_ifaces, struct hmap *local_datapaths) { /* Ignore localnet ports for unplugged networks. */ @@ -555,9 +521,6 @@ update_ld_localnet_port(const struct sbrec_port_binding *binding_rec, return; } - add_localnet_egress_interface_mappings(binding_rec, - bridge_mappings, egress_ifaces); - struct local_datapath *ld = get_local_datapath(local_datapaths, binding_rec->datapath->tunnel_key); @@ -2127,7 +2090,6 @@ binding_run(struct binding_ctx_in *b_ctx_in, struct binding_ctx_out *b_ctx_out) struct lport *lnet_lport; LIST_FOR_EACH_POP (lnet_lport, list_node, &localnet_lports) { update_ld_localnet_port(lnet_lport->pb, &bridge_mappings, - b_ctx_out->egress_ifaces, b_ctx_out->local_datapaths); free(lnet_lport); } @@ -2932,7 +2894,6 @@ handle_updated_port(struct binding_ctx_in *b_ctx_in, b_ctx_in->bridge_table, &bridge_mappings); update_ld_localnet_port(pb, &bridge_mappings, - b_ctx_out->egress_ifaces, b_ctx_out->local_datapaths); shash_destroy(&bridge_mappings); break; @@ -3128,7 +3089,6 @@ delete_done: enum en_lport_type lport_type = get_lport_type(pb); if (lport_type == LP_LOCALNET) { update_ld_localnet_port(pb, &bridge_mappings, - b_ctx_out->egress_ifaces, b_ctx_out->local_datapaths); } else if (lport_type == LP_EXTERNAL) { update_ld_external_ports(pb, b_ctx_out->local_datapaths); diff --git a/controller/binding.h b/controller/binding.h index 6b97bcff0..84b4cb591 100644 --- a/controller/binding.h +++ b/controller/binding.h @@ -91,7 +91,6 @@ struct binding_ctx_out { */ bool non_vif_ports_changed; - struct sset *egress_ifaces; struct hmap *qos_map; /* smap of OVS interface name as key and * OVS interface external_ids:iface-id as value. */ diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c index 1dd1099a4..04c4af68e 100644 --- a/controller/ovn-controller.c +++ b/controller/ovn-controller.c @@ -1347,7 +1347,6 @@ struct ed_type_runtime_data { struct sset active_tunnels; /* runtime data engine private data. */ - struct sset egress_ifaces; struct hmap qos_map; struct smap local_iface_ids; @@ -1407,8 +1406,8 @@ struct ed_type_runtime_data { * | local_lport_ids | is not tracked explicitly. | * --------------------------------------------------------------------- * | local_iface_ids | This is used internally within the runtime data | - * | egress_ifaces | engine (used only in binding.c) and hence there | - * | qos_map | there is no need to track. | + * | qos_map | engine (used only in binding.c) and hence there | + * | | there is no need to track. | * --------------------------------------------------------------------- * | | Active tunnels is built in the | * | | bfd_calculate_active_tunnels() for the tunnel | @@ -1444,7 +1443,6 @@ en_runtime_data_init(struct engine_node *node OVS_UNUSED, sset_init(&data->local_lports); related_lports_init(&data->related_lports); sset_init(&data->active_tunnels); - sset_init(&data->egress_ifaces); hmap_init(&data->qos_map); smap_init(&data->local_iface_ids); local_binding_data_init(&data->lbinding_data); @@ -1465,7 +1463,6 @@ en_runtime_data_cleanup(void *data) sset_destroy(&rt_data->local_lports); related_lports_destroy(&rt_data->related_lports); sset_destroy(&rt_data->active_tunnels); - sset_destroy(&rt_data->egress_ifaces); destroy_qos_map(&rt_data->qos_map); smap_destroy(&rt_data->local_iface_ids); local_datapaths_destroy(&rt_data->local_datapaths); @@ -1555,7 +1552,6 @@ init_binding_ctx(struct engine_node *node, b_ctx_out->related_lports = &rt_data->related_lports; b_ctx_out->related_lports_changed = false; b_ctx_out->non_vif_ports_changed = false; - b_ctx_out->egress_ifaces = &rt_data->egress_ifaces; b_ctx_out->qos_map = &rt_data->qos_map; b_ctx_out->lbinding_data = &rt_data->lbinding_data; b_ctx_out->local_iface_ids = &rt_data->local_iface_ids; @@ -1586,14 +1582,12 @@ en_runtime_data_run(struct engine_node *node, void *data) sset_destroy(local_lports); related_lports_destroy(&rt_data->related_lports); sset_destroy(active_tunnels); - sset_destroy(&rt_data->egress_ifaces); destroy_qos_map(&rt_data->qos_map); smap_destroy(&rt_data->local_iface_ids); hmap_init(local_datapaths); sset_init(local_lports); related_lports_init(&rt_data->related_lports); sset_init(active_tunnels); - sset_init(&rt_data->egress_ifaces); hmap_init(&rt_data->qos_map); smap_init(&rt_data->local_iface_ids); local_binding_data_init(&rt_data->lbinding_data); -- 2.40.1 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev