#include <stdbool.h>
#include <inttypes.h>
+#include "connmgr.h"
#include "coverage.h"
#include "dynamic-string.h"
#include "dpif.h"
{
struct handler *handler = arg;
- set_subprogram_name("upcall_handler");
+ set_subprogram_name("upcall_%u", ovsthread_id_self());
for (;;) {
struct list misses = LIST_INITIALIZER(&misses);
size_t i;
userdata_len = nl_attr_get_size(dpif_upcall->userdata);
if (userdata_len < sizeof cookie.type
|| userdata_len > sizeof cookie) {
- VLOG_WARN_RL(&rl, "action upcall cookie has unexpected size %zu",
+ VLOG_WARN_RL(&rl, "action upcall cookie has unexpected size %"PRIuSIZE,
userdata_len);
return BAD_UPCALL;
}
return IPFIX_UPCALL;
} else {
VLOG_WARN_RL(&rl, "invalid user cookie of type %"PRIu16
- " and size %zu", cookie.type, userdata_len);
+ " and size %"PRIuSIZE, cookie.type, userdata_len);
return BAD_UPCALL;
}
}
LIST_FOR_EACH (upcall, list_node, upcalls) {
struct flow_miss *miss = upcall->flow_miss;
struct ofpbuf *packet = upcall->dpif_upcall.packet;
- struct ofputil_packet_in *pin;
+ struct ofproto_packet_in *pin;
pin = xmalloc(sizeof *pin);
- pin->packet = xmemdup(packet->data, packet->size);
- pin->packet_len = packet->size;
- pin->reason = OFPR_NO_MATCH;
- pin->controller_id = 0;
- pin->table_id = 0;
- pin->cookie = 0;
+ pin->up.packet = xmemdup(packet->data, packet->size);
+ pin->up.packet_len = packet->size;
+ pin->up.reason = OFPR_NO_MATCH;
+ pin->up.table_id = 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. */
- flow_get_metadata(&miss->flow, &pin->fmd);
+ pin->generated_by_table_miss = false;
ofproto_dpif_send_packet_in(miss->ofproto, pin);
}
}