udpif_set_threads(backer->udpif, n_handlers, n_revalidators);
}
- dpif_poll_threads_set(backer->dpif, n_dpdk_rxqs, pmd_cpu_mask);
+ dpif_poll_threads_set(backer->dpif, pmd_cpu_mask);
if (backer->need_revalidate) {
struct ofproto_dpif *ofproto;
controller->max_len = UINT16_MAX;
controller->controller_id = 0;
controller->reason = OFPR_IMPLICIT_MISS;
+ ofpact_finish(&ofpacts, &controller->ofpact);
error = add_internal_miss_flow(ofproto, id++, &ofpacts,
&ofproto->miss_rule);
}
static void
-port_destruct(struct ofport *port_)
+port_destruct(struct ofport *port_, bool del)
{
struct ofport_dpif *port = ofport_dpif_cast(port_);
struct ofproto_dpif *ofproto = ofproto_dpif_cast(port->up.ofproto);
dp_port_name = netdev_vport_get_dpif_port(port->up.netdev, namebuf,
sizeof namebuf);
- if (dpif_port_exists(ofproto->backer->dpif, dp_port_name)) {
+ if (del && dpif_port_exists(ofproto->backer->dpif, dp_port_name)) {
/* The underlying device is still there, so delete it. This
* happens when the ofproto is being destroyed, since the caller
* assumes that removal of attached ports will happen as part of
ofpacts_len, packet);
return 0;
}
+
+static enum ofperr
+nxt_resume(struct ofproto *ofproto_,
+ const struct ofputil_packet_in_private *pin)
+{
+ struct ofproto_dpif *ofproto = ofproto_dpif_cast(ofproto_);
+
+ /* Translate pin into datapath actions. */
+ uint64_t odp_actions_stub[1024 / 8];
+ struct ofpbuf odp_actions = OFPBUF_STUB_INITIALIZER(odp_actions_stub);
+ enum slow_path_reason slow;
+ enum ofperr error = xlate_resume(ofproto, pin, &odp_actions, &slow);
+
+ /* Steal 'pin->packet' and put it into a dp_packet. */
+ struct dp_packet packet;
+ dp_packet_init(&packet, pin->public.packet_len);
+ dp_packet_put(&packet, pin->public.packet, pin->public.packet_len);
+
+ /* Execute the datapath actions on the packet. */
+ struct dpif_execute execute = {
+ .actions = odp_actions.data,
+ .actions_len = odp_actions.size,
+ .needs_help = (slow & SLOW_ACTION) != 0,
+ .packet = &packet,
+ };
+ dpif_execute(ofproto->backer->dpif, &execute);
+
+ /* Clean up. */
+ ofpbuf_uninit(&odp_actions);
+ dp_packet_uninit(&packet);
+
+ return error;
+}
\f
/* NetFlow. */
rule_execute,
set_frag_handling,
packet_out,
+ nxt_resume,
set_netflow,
get_netflow_ids,
set_sflow,