@@ -1037,6 +1037,18 @@ local_binding_set_down(struct shash *local_bindings, const char *pb_name,
}
}
+void
+binding_dump_related_lports(struct related_lports *related_lports,
+ struct ds *out_data)
+{
+ const char *name;
+ if (sset_count(&related_lports->lport_names)) {
+ SSET_FOR_EACH (name, &related_lports->lport_names) {
+ ds_put_format(out_data, "%s\n", name);
+ }
+ }
+}
+
void
binding_dump_local_bindings(struct local_binding_data *lbinding_data,
struct ds *out_data)
@@ -202,6 +202,9 @@ void binding_tracked_dp_destroy(struct hmap *tracked_datapaths);
void binding_dump_local_bindings(struct local_binding_data *, struct ds *);
+void binding_dump_related_lports(struct related_lports *related_lports,
+ struct ds *);
+
bool is_additional_chassis(const struct sbrec_port_binding *pb,
const struct sbrec_chassis *chassis_rec);
@@ -99,6 +99,7 @@ static unixctl_cb_func debug_pause_execution;
static unixctl_cb_func debug_resume_execution;
static unixctl_cb_func debug_status_execution;
static unixctl_cb_func debug_dump_local_bindings;
+static unixctl_cb_func debug_dump_related_lports;
static unixctl_cb_func debug_dump_local_template_vars;
static unixctl_cb_func debug_dump_lflow_conj_ids;
static unixctl_cb_func lflow_cache_flush_cmd;
@@ -5310,6 +5311,10 @@ main(int argc, char *argv[])
debug_dump_local_bindings,
&runtime_data->lbinding_data);
+ unixctl_command_register("debug/dump-related-ports", "", 0, 0,
+ debug_dump_related_lports,
+ &runtime_data->related_lports);
+
unixctl_command_register("debug/dump-lflow-conj-ids", "", 0, 0,
debug_dump_lflow_conj_ids,
&lflow_output_data->conj_ids);
@@ -6220,6 +6225,16 @@ debug_dump_local_bindings(struct unixctl_conn *conn, int argc OVS_UNUSED,
ds_destroy(&binding_data);
}
+static void
+debug_dump_related_lports(struct unixctl_conn *conn, int argc OVS_UNUSED,
+ const char *argv[] OVS_UNUSED, void *related_lports)
+{
+ struct ds data = DS_EMPTY_INITIALIZER;
+ binding_dump_related_lports(related_lports, &data);
+ unixctl_command_reply(conn, ds_cstr(&data));
+ ds_destroy(&data);
+}
+
static void
debug_dump_lflow_conj_ids(struct unixctl_conn *conn, int argc OVS_UNUSED,
const char *argv[] OVS_UNUSED, void *conj_ids)
Signed-off-by: Xavier Simonart <xsimonar@redhat.com> --- controller/binding.c | 12 ++++++++++++ controller/binding.h | 3 +++ controller/ovn-controller.c | 15 +++++++++++++++ 3 files changed, 30 insertions(+)