- int error = dpif->dpif_class->recv(dpif, packetp);
- if (!error) {
- struct ofpbuf *buf = *packetp;
-
- assert(ofpbuf_headroom(buf) >= DPIF_RECV_MSG_PADDING);
- if (VLOG_IS_DBG_ENABLED()) {
- struct odp_msg *msg = buf->data;
- void *payload = msg + 1;
- size_t payload_len = buf->size - sizeof *msg;
- char *s = ofp_packet_to_string(payload, payload_len, payload_len);
- VLOG_DBG_RL(&dpmsg_rl, "%s: received %s message of length "
- "%zu on port %"PRIu16": %s", dpif_name(dpif),
- (msg->type == _ODPL_MISS_NR ? "miss"
- : msg->type == _ODPL_ACTION_NR ? "action"
- : msg->type == _ODPL_SFLOW_NR ? "sFlow"
- : "<unknown>"),
- payload_len, msg->port, s);
- free(s);
- }
- } else {
- *packetp = NULL;
+ int error = dpif->dpif_class->recv(dpif, upcall);
+ if (!error && !VLOG_DROP_DBG(&dpmsg_rl)) {
+ struct flow flow;
+ char *s;
+
+ s = ofp_packet_to_string(upcall->packet->data,
+ upcall->packet->size, upcall->packet->size);
+ odp_flow_key_to_flow(upcall->key, upcall->key_len, &flow);
+
+ VLOG_DBG("%s: %s upcall on port %"PRIu16": %s", dpif_name(dpif),
+ (upcall->type == _ODPL_MISS_NR ? "miss"
+ : upcall->type == _ODPL_ACTION_NR ? "action"
+ : upcall->type == _ODPL_SFLOW_NR ? "sFlow"
+ : "<unknown>"),
+ flow.in_port, s);
+ free(s);