struct dpif_execute_helper_aux {
struct dpif *dpif;
+ const struct flow *flow;
int error;
};
}
execute.packet = packet;
+ execute.flow = aux->flow;
execute.needs_help = false;
execute.probe = false;
execute.mtu = 0;
static int
dpif_execute_with_help(struct dpif *dpif, struct dpif_execute *execute)
{
- struct dpif_execute_helper_aux aux = {dpif, 0};
+ struct dpif_execute_helper_aux aux = {dpif, execute->flow, 0};
struct dp_packet_batch pb;
COVERAGE_INC(dpif_execute_with_help);
bool probe; /* Suppress error messages. */
unsigned int mtu; /* Maximum transmission unit to fragment.
0 if not a fragmented packet */
+ const struct flow *flow; /* Flow extracted from 'packet'. */
/* Input, but possibly modified as a side effect of execution. */
struct dp_packet *packet; /* Packet to execute. */
op->ukey = NULL;
op->dop.type = DPIF_OP_EXECUTE;
op->dop.u.execute.packet = CONST_CAST(struct dp_packet *, packet);
+ op->dop.u.execute.flow = upcall->flow;
odp_key_to_pkt_metadata(upcall->key, upcall->key_len,
&op->dop.u.execute.packet->md);
op->dop.u.execute.actions = upcall->odp_actions.data;
struct ofpbuf actions;
struct dpif_execute execute;
struct dp_packet packet;
+ struct flow flow;
size_t start;
int error;
eth = dp_packet_put_zeros(&packet, ETH_HEADER_LEN);
eth->eth_type = htons(0x1234);
+ flow_extract(&packet, &flow);
+
/* Execute the actions. On older datapaths this fails with ERANGE, on
* newer datapaths it succeeds. */
execute.actions = actions.data;
execute.actions_len = actions.size;
execute.packet = &packet;
+ execute.flow = &flow;
execute.needs_help = false;
execute.probe = true;
execute.mtu = 0;
struct ofpbuf actions;
struct dpif_execute execute;
struct dp_packet packet;
+ struct flow flow;
int error;
struct ovs_key_ethernet key, mask;
eth = dp_packet_put_zeros(&packet, ETH_HEADER_LEN);
eth->eth_type = htons(0x1234);
+ flow_extract(&packet, &flow);
+
/* Execute the actions. On older datapaths this fails with EINVAL, on
* newer datapaths it succeeds. */
execute.actions = actions.data;
execute.actions_len = actions.size;
execute.packet = &packet;
+ execute.flow = &flow;
execute.needs_help = false;
execute.probe = true;
execute.mtu = 0;
pkt_metadata_from_flow(&packet->md, flow);
execute.packet = packet;
+ execute.flow = flow;
execute.needs_help = (xout.slow & SLOW_ACTION) != 0;
execute.probe = false;
execute.mtu = 0;
.actions_len = odp_actions.size,
.needs_help = (slow & SLOW_ACTION) != 0,
.packet = &packet,
+ .flow = &headers,
};
dpif_execute(ofproto->backer->dpif, &execute);