+
+/* Moves the mport on top of the heap. This is necessary when
+ * for example, bfd POLL is received and the mport should
+ * immediately send FINAL back. */
+void
+ofproto_dpif_monitor_port_send_soon_safe(const struct ofport_dpif *ofport)
+{
+ ovs_mutex_lock(&monitor_mutex);
+ ofproto_dpif_monitor_port_send_soon(ofport);
+ ovs_mutex_unlock(&monitor_mutex);
+}
+
+void
+ofproto_dpif_monitor_port_send_soon(const struct ofport_dpif *ofport)
+ OVS_REQUIRES(monitor_mutex)
+{
+ struct mport *mport;
+
+ mport = mport_find(ofport);
+ if (mport) {
+ heap_change(&monitor_heap, &mport->heap_node, LLONG_MAX);
+ }
+}