+ if (!bridge_exporter_enabled(di)) {
+ ovs_mutex_unlock(&mutex);
+ return;
+ }
+
+ /* Skip BFD packets:
+ * Bidirectional Forwarding Detection(BFD) packets are for monitoring
+ * the tunnel link status and consumed by ovs itself. No need to
+ * smaple them.
+ * CF IETF RFC 5881, BFD control packet is the UDP packet with
+ * destination port 3784, and BFD echo packet is the UDP packet with
+ * destination port 3785.
+ */
+ if (is_ip_any(flow) &&
+ flow->nw_proto == IPPROTO_UDP &&
+ (flow->tp_dst == htons(BFD_CONTROL_DEST_PORT) ||
+ flow->tp_dst == htons(BFD_ECHO_DEST_PORT))) {
+ ovs_mutex_unlock(&mutex);
+ return;
+ }
+