@@ -23,12 +23,24 @@
#include "lib/inc-proc-eng.h"
#include "northd.h"
+#include "stopwatch.h"
+#include "lib/stopwatch-names.h"
+#include "timeval.h"
#include "openvswitch/vlog.h"
VLOG_DEFINE_THIS_MODULE(en_lflow);
void en_lflow_run(struct engine_node *node, void *data OVS_UNUSED)
{
+ const struct engine_context *eng_ctx = engine_get_context();
+ struct northd_idl_context *ctx = eng_ctx->client_ctx;
+
+ struct ed_type_northd *northd_data = engine_get_input_data("northd", node);
+
+ stopwatch_start(BUILD_LFLOWS_STOPWATCH_NAME, time_msec());
+ build_lflows(ctx, northd_data->data);
+ stopwatch_stop(BUILD_LFLOWS_STOPWATCH_NAME, time_msec());
+
engine_set_node_state(node, EN_UPDATED);
}
void *en_lflow_init(struct engine_node *node OVS_UNUSED,
@@ -13327,8 +13327,7 @@ static bool reset_parallel = false;
/* Updates the Logical_Flow and Multicast_Group tables in the OVN_SB database,
* constructing their contents based on the OVN_NB database. */
-static void
-build_lflows(struct northd_idl_context *ctx, struct northd_data *data)
+void build_lflows(struct northd_idl_context *ctx, struct northd_data *data)
{
struct hmap lflows;
@@ -14542,9 +14541,6 @@ ovnnb_db_run(struct northd_data *data,
build_meter_groups(ctx, &data->meter_groups);
build_bfd_table(ctx, &data->bfd_connections, &data->ports);
stopwatch_stop(BUILD_LFLOWS_CTX_STOPWATCH_NAME, time_msec());
- stopwatch_start(BUILD_LFLOWS_STOPWATCH_NAME, time_msec());
- build_lflows(ctx, data);
- stopwatch_stop(BUILD_LFLOWS_STOPWATCH_NAME, time_msec());
stopwatch_start(CLEAR_LFLOWS_CTX_STOPWATCH_NAME, time_msec());
ovn_update_ipv6_prefix(&data->ports);
@@ -51,5 +51,6 @@ void northd_destroy(struct northd_data *data);
void northd_init(struct northd_data *data);
void northd_indices_create(struct northd_data *data,
struct ovsdb_idl *ovnsb_idl);
+void build_lflows(struct northd_idl_context *ctx, struct northd_data *data);
#endif /* NORTHD_H */
Generate logical flows using 'en_flow' incremental processing node. This node uses output data from 'en_northd' in order to generate logical flows. Signed-off-by: Mark Gray <mark.d.gray@redhat.com> --- northd/en-lflow.c | 12 ++++++++++++ northd/northd.c | 6 +----- northd/northd.h | 1 + 3 files changed, 14 insertions(+), 5 deletions(-)