egress_ifaces sset is no longer used by ovn-controller, so get rid of it Acked-by: Numan Siddique <num...@ovn.org> 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 befe3abda..28218b2e8 100644 --- a/controller/binding.c +++ b/controller/binding.c @@ -472,39 +472,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) @@ -545,7 +512,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. */ @@ -553,9 +519,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); @@ -2125,7 +2088,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); } @@ -2928,7 +2890,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; @@ -3124,7 +3085,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 e238f5c22..94481f0c5 100644 --- a/controller/ovn-controller.c +++ b/controller/ovn-controller.c @@ -1348,7 +1348,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; @@ -1408,8 +1407,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 | @@ -1445,7 +1444,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); @@ -1466,7 +1464,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); @@ -1556,7 +1553,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; @@ -1587,14 +1583,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