struct ofpbuf recv_bufs[UPCALL_MAX_BATCH];
struct dpif_upcall dupcalls[UPCALL_MAX_BATCH];
struct upcall upcalls[UPCALL_MAX_BATCH];
+ struct flow flows[UPCALL_MAX_BATCH];
size_t n_upcalls, i;
n_upcalls = 0;
struct ofpbuf *recv_buf = &recv_bufs[n_upcalls];
struct dpif_upcall *dupcall = &dupcalls[n_upcalls];
struct upcall *upcall = &upcalls[n_upcalls];
+ struct flow *flow = &flows[n_upcalls];
struct pkt_metadata md;
- struct flow flow;
int error;
ofpbuf_use_stub(recv_buf, recv_stubs[n_upcalls],
break;
}
- if (odp_flow_key_to_flow(dupcall->key, dupcall->key_len, &flow)
+ if (odp_flow_key_to_flow(dupcall->key, dupcall->key_len, flow)
== ODP_FIT_ERROR) {
goto free_dupcall;
}
error = upcall_receive(upcall, udpif->backer, &dupcall->packet,
- dupcall->type, dupcall->userdata, &flow);
+ dupcall->type, dupcall->userdata, flow);
if (error) {
if (error == ENODEV) {
/* Received packet on datapath port for which we couldn't
dpif_flow_put(udpif->dpif, DPIF_FP_CREATE, dupcall->key,
dupcall->key_len, NULL, 0, NULL, 0, NULL);
VLOG_INFO_RL(&rl, "received packet on unassociated datapath "
- "port %"PRIu32, flow.in_port.odp_port);
+ "port %"PRIu32, flow->in_port.odp_port);
}
goto free_dupcall;
}
upcall->out_tun_key = dupcall->out_tun_key;
- if (vsp_adjust_flow(upcall->ofproto, &flow, &dupcall->packet)) {
+ if (vsp_adjust_flow(upcall->ofproto, flow, &dupcall->packet)) {
upcall->vsp_adjusted = true;
}
- md = pkt_metadata_from_flow(&flow);
- flow_extract(&dupcall->packet, &md, &flow);
+ md = pkt_metadata_from_flow(flow);
+ flow_extract(&dupcall->packet, &md, flow);
error = process_upcall(udpif, upcall, NULL);
if (error) {