+/* When forwarding_if_rx is enabled, if there are packets received,
+ * updates forwarding_if_rx_detect_time. */
+void
+bfd_account_rx(struct bfd *bfd, const struct dpif_flow_stats *stats)
+{
+ if (stats->n_packets && bfd->forwarding_if_rx) {
+ ovs_mutex_lock(&mutex);
+ bfd_forwarding__(bfd);
+ bfd_forwarding_if_rx_update(bfd);
+ bfd_forwarding__(bfd);
+ ovs_mutex_unlock(&mutex);
+ }
+}
+
+/* Returns and resets the 'bfd->status_changed'. */
+bool
+bfd_check_status_change(struct bfd *bfd) OVS_EXCLUDED(mutex)
+{
+ bool ret;
+
+ ovs_mutex_lock(&mutex);
+ ret = bfd->status_changed;
+ bfd->status_changed = false;
+ ovs_mutex_unlock(&mutex);
+
+ return ret;
+}
+