conntrack_flush(struct conntrack *ct, const uint16_t *zone)
{
    for (unsigned i = 0; i < CONNTRACK_BUCKETS; i++) {
        struct conntrack_bucket *ctb = &ct->buckets[i];
        ovs_mutex_lock(&ctb->cleanup_mutex);
        ct_lock_lock(&ctb->lock);
        for (unsigned j = 0; j < N_CT_TM; j++) {
            struct conn *conn, *next;
            LIST_FOR_EACH_SAFE (conn, next, exp_node, &ctb->exp_lists[j]) {
                if (!zone || *zone == conn->key.zone) {
                    conn_clean(ct, conn, ctb);
                }
            }
        }
        ct_lock_unlock(&ctb->lock);
        ovs_mutex_unlock(&ctb->cleanup_mutex);
    }

    return 0;
}
conntrack_flush(struct conntrack *ct, const uint16_t *zone)
{
    for (unsigned i = 0; i < CONNTRACK_BUCKETS; i++) {
        struct conntrack_bucket *ctb = &ct->buckets[i];
        ovs_mutex_lock(&ctb->cleanup_mutex);
        ct_lock_lock(&ctb->lock);
        for (unsigned j = 0; j < N_CT_TM; j++) {
            struct conn *conn, *next;
            LIST_FOR_EACH_SAFE (conn, next, exp_node, &ctb->exp_lists[j]) {
                if (!zone || *zone == conn->key.zone) {
                    conn_clean(ct, conn, ctb);
                }
            }
        }
        ct_lock_unlock(&ctb->lock);
        ovs_mutex_unlock(&ctb->cleanup_mutex);
    }

    return 0;
}