\f
/* Sending asynchronous messages. */
-static void schedule_packet_in(struct ofconn *, struct ofputil_packet_in,
- const struct flow *);
+static void schedule_packet_in(struct ofconn *, struct ofputil_packet_in);
/* Sends an OFPT_PORT_STATUS message with 'opp' and 'reason' to appropriate
* controllers managed by 'mgr'. */
* necessary according to their individual configurations. */
void
connmgr_send_packet_in(struct connmgr *mgr,
- const struct ofputil_packet_in *pin,
- const struct flow *flow)
+ const struct ofputil_packet_in *pin)
{
struct ofconn *ofconn;
LIST_FOR_EACH (ofconn, node, &mgr->all_conns) {
if (ofconn_receives_async_msg(ofconn, OAM_PACKET_IN, pin->reason)
&& ofconn->controller_id == pin->controller_id) {
- schedule_packet_in(ofconn, *pin, flow);
+ schedule_packet_in(ofconn, *pin);
}
}
}
ofconn->packet_in_counter, 100);
}
-/* Takes 'pin', whose packet has the flow specified by 'flow', composes an
- * OpenFlow packet-in message from it, and passes it to 'ofconn''s packet
- * scheduler for sending. */
+/* Takes 'pin', composes an OpenFlow packet-in message from it, and passes it
+ * to 'ofconn''s packet scheduler for sending. */
static void
-schedule_packet_in(struct ofconn *ofconn, struct ofputil_packet_in pin,
- const struct flow *flow)
+schedule_packet_in(struct ofconn *ofconn, struct ofputil_packet_in pin)
{
struct connmgr *mgr = ofconn->connmgr;
pin.buffer_id = UINT32_MAX;
} else {
pin.buffer_id = pktbuf_save(ofconn->pktbuf, pin.packet, pin.packet_len,
- flow->in_port);
+ pin.fmd.in_port);
}
/* Figure out how much of the packet to send. */
* immediately call into do_send_packet_in() or it might buffer it for a
* while (until a later call to pinsched_run()). */
pinsched_send(ofconn->schedulers[pin.reason == OFPR_NO_MATCH ? 0 : 1],
- flow->in_port,
+ pin.fmd.in_port,
ofputil_encode_packet_in(&pin, ofconn->packet_in_format),
do_send_packet_in, ofconn);
}
const struct ofputil_phy_port *, uint8_t reason);
void connmgr_send_flow_removed(struct connmgr *,
const struct ofputil_flow_removed *);
-void connmgr_send_packet_in(struct connmgr *, const struct ofputil_packet_in *,
- const struct flow *);
+void connmgr_send_packet_in(struct connmgr *,
+ const struct ofputil_packet_in *);
/* Fail-open settings. */
enum ofproto_fail_mode connmgr_get_fail_mode(const struct connmgr *);
/* Registers aren't meaningful on a miss. */
memset(pin.fmd.reg_masks, 0, sizeof pin.fmd.reg_masks);
- connmgr_send_packet_in(ofproto->up.connmgr, &pin, flow);
+ connmgr_send_packet_in(ofproto->up.connmgr, &pin);
}
static bool
pin.total_len = packet->size;
flow_get_metadata(&ctx->flow, &pin.fmd);
- connmgr_send_packet_in(ctx->ofproto->up.connmgr, &pin, &ctx->flow);
+ connmgr_send_packet_in(ctx->ofproto->up.connmgr, &pin);
ofpbuf_delete(packet);
}