The handler will run only in case that the SB becomes writable, there
is no need to check for SB readonly.

Acked-by: Xavier Simonart <[email protected]>
Signed-off-by: Ales Musil <[email protected]>
---
v2: Remove the extra check pointed out by Xavier.
    Update commit message.
    Add ack from Xavier.
---
 controller/if-status.c      | 5 ++---
 controller/if-status.h      | 3 +--
 controller/ovn-controller.c | 9 +++------
 3 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/controller/if-status.c b/controller/if-status.c
index dc7b66ee2..32b6064ba 100644
--- a/controller/if-status.c
+++ b/controller/if-status.c
@@ -428,10 +428,9 @@ if_status_handle_claims(struct if_status_mgr *mgr,
                         struct local_binding_data *binding_data,
                         const struct sbrec_chassis *chassis_rec,
                         struct hmap *tracked_datapath,
-                        const struct sbrec_port_binding_table *pb_table,
-                        bool sb_readonly)
+                        const struct sbrec_port_binding_table *pb_table)
 {
-    if (!binding_data || sb_readonly) {
+    if (!binding_data) {
         return false;
     }
 
diff --git a/controller/if-status.h b/controller/if-status.h
index eb91b62fd..d4f972355 100644
--- a/controller/if-status.h
+++ b/controller/if-status.h
@@ -58,8 +58,7 @@ bool if_status_handle_claims(struct if_status_mgr *mgr,
                              struct local_binding_data *binding_data,
                              const struct sbrec_chassis *chassis_rec,
                              struct hmap *tracked_datapath,
-                             const struct sbrec_port_binding_table *pb_table,
-                             bool sb_readonly);
+                             const struct sbrec_port_binding_table *pb_table);
 void if_status_mgr_remove_ovn_installed(struct if_status_mgr *mgr,
                                     const struct ovsrec_interface *iface_rec);
 uint16_t if_status_mgr_iface_get_mtu(const struct if_status_mgr *mgr,
diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c
index 1365f3e65..ebf4780f0 100644
--- a/controller/ovn-controller.c
+++ b/controller/ovn-controller.c
@@ -1648,15 +1648,12 @@ runtime_data_sb_ro_handler(struct engine_node *node, 
void *data)
     }
     if (chassis) {
         struct ed_type_runtime_data *rt_data = data;
-        bool sb_readonly = !engine_get_context()->ovnsb_idl_txn;
         struct controller_engine_ctx *ctrl_ctx =
             engine_get_context()->client_ctx;
 
-        if (if_status_handle_claims(ctrl_ctx->if_mgr,
-                                    &rt_data->lbinding_data,
-                                    chassis,
-                                    &rt_data->tracked_dp_bindings,
-                                    pb_table, sb_readonly)) {
+        if (if_status_handle_claims(ctrl_ctx->if_mgr, &rt_data->lbinding_data,
+                                    chassis, &rt_data->tracked_dp_bindings,
+                                    pb_table)) {
             result = EN_HANDLED_UPDATED;
             rt_data->tracked = true;
         }
-- 
2.49.0

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

Reply via email to