size_t i;
ovs_mutex_lock(&handler->mutex);
- if (!handler->n_upcalls) {
+ /* Must check the 'exit_latch' again to make sure the main thread is
+ * not joining on the handler thread. */
+ if (!handler->n_upcalls
+ && !latch_is_set(&handler->udpif->exit_latch)) {
ovs_mutex_cond_wait(&handler->wake_cond, &handler->mutex);
}
type = classify_upcall(upcall);
if (type == MISS_UPCALL) {
uint32_t hash;
- struct pkt_metadata md = PKT_METADATA_INITIALIZER_FLOW(&flow);
+ struct pkt_metadata md = pkt_metadata_from_flow(&flow);
flow_extract(packet, &md, &miss->flow);
hash = flow_hash(&miss->flow, 0);
pin->up.cookie = OVS_BE64_MAX;
flow_get_metadata(&miss->flow, &pin->up.fmd);
pin->send_len = 0; /* Not used for flow table misses. */
- pin->generated_by_table_miss = false;
+ pin->miss_type = OFPROTO_PACKET_IN_NO_MISS;
ofproto_dpif_send_packet_in(miss->ofproto, pin);
}
}