@@ -495,39 +495,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)
@@ -568,7 +535,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. */
@@ -576,9 +542,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);
@@ -2148,7 +2111,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);
}
@@ -2958,7 +2920,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;
@@ -3154,7 +3115,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);
@@ -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. */
@@ -1346,7 +1346,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;
@@ -1406,8 +1405,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 |
@@ -1443,7 +1442,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);
@@ -1464,7 +1462,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);
@@ -1554,7 +1551,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;
@@ -1585,14 +1581,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);
egress_ifaces sset is no longer used by ovn-controller, so get rid of it Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> --- controller/binding.c | 40 ------------------------------------- controller/binding.h | 1 - controller/ovn-controller.c | 10 ++-------- 3 files changed, 2 insertions(+), 49 deletions(-)