There was an issue with using the EVPN datapaths in a different node
as the data would be cleared before every engine run. Make sure they
stay until the next proper run of the node.

Fixes: f15bfbe3545a ("evpn-binding: Improve the evpn_datapath structure and 
optimize lookups.")
Signed-off-by: Ales Musil <[email protected]>
---
 controller/evpn-binding.c   | 4 +++-
 controller/evpn-binding.h   | 1 -
 controller/ovn-controller.c | 1 -
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/controller/evpn-binding.c b/controller/evpn-binding.c
index b176706c3..4da8020e1 100644
--- a/controller/evpn-binding.c
+++ b/controller/evpn-binding.c
@@ -32,6 +32,7 @@ static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 1);
 
 static void collect_evpn_datapaths(const struct hmap *local_datapaths,
                                    struct hmap *evpn_datapaths);
+static void evpn_datapaths_clear(struct hmap *evpn_datapaths);
 
 struct evpn_tunnel {
     uint16_t dst_port;
@@ -62,6 +63,7 @@ evpn_binding_run(const struct evpn_binding_ctx_in *b_ctx_in,
     struct hmapx stale_mc_groups = HMAPX_INITIALIZER(&stale_mc_groups);
     uint32_t hint = OVN_MIN_EVPN_KEY;
 
+    evpn_datapaths_clear(b_ctx_out->datapaths);
     collect_evpn_datapaths(b_ctx_in->local_datapaths, b_ctx_out->datapaths);
 
     struct evpn_binding *binding;
@@ -233,7 +235,7 @@ evpn_datapath_find(const struct hmap *evpn_datapaths, 
uint32_t vni)
     return NULL;
 }
 
-void
+static void
 evpn_datapaths_clear(struct hmap *evpn_datapaths)
 {
     struct evpn_datapath *edp;
diff --git a/controller/evpn-binding.h b/controller/evpn-binding.h
index 29b85fc16..521db9d6e 100644
--- a/controller/evpn-binding.h
+++ b/controller/evpn-binding.h
@@ -93,7 +93,6 @@ void evpn_vtep_binding_list(struct unixctl_conn *conn, int 
argc,
                              const char *argv[], void *data_);
 const struct evpn_datapath *evpn_datapath_find(
         const struct hmap *evpn_datapaths, uint32_t vni);
-void evpn_datapaths_clear(struct hmap *evpn_datapaths);
 void evpn_datapaths_destroy(struct hmap *evpn_datapaths);
 void evpn_multicast_groups_destroy(struct hmap *multicast_groups);
 void evpn_multicast_group_list(struct unixctl_conn *conn, int argc,
diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c
index de6975f98..6f7578582 100644
--- a/controller/ovn-controller.c
+++ b/controller/ovn-controller.c
@@ -6550,7 +6550,6 @@ en_evpn_vtep_binding_clear_tracked_data(void *data_)
     struct ed_type_evpn_vtep_binding *data = data_;
     hmapx_clear(&data->updated_bindings);
     uuidset_clear(&data->removed_bindings);
-    evpn_datapaths_clear(&data->datapaths);
     hmapx_clear(&data->updated_multicast_groups);
     uuidset_clear(&data->removed_multicast_groups);
 }
-- 
2.53.0

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to