rule = lookup_valid_rule(p, &flow);
if (!rule) {
- struct ofport *port;
-
- if (p->ofhooks->packet_in_cb
- && p->ofhooks->packet_in_cb(&flow, &payload, p->aux)) {
- ofpbuf_delete(packet);
- return;
- }
-
/* Don't send a packet-in if OFPPC_NO_PACKET_IN asserted. */
- port = port_array_get(&p->ports, msg->port);
+ struct ofport *port = port_array_get(&p->ports, msg->port);
if (port) {
if (port->opp.config & OFPPC_NO_PACKET_IN) {
/* XXX install 'drop' flow entry */
}
static const struct ofhooks default_ofhooks = {
- NULL,
- NULL,
NULL,
default_normal_ofhook_cb,
};
struct ofhooks {
void (*port_changed_cb)(enum ofp_port_reason, const struct ofp_phy_port *,
void *aux);
- bool (*packet_in_cb)(const flow_t *, const struct ofpbuf *payload,
- void *aux);
- void (*flow_expired_cb)(const struct ofexpired *, void *aux);
void (*normal_cb)(const flow_t *, bool revalidating,
struct odp_actions *, tag_type *, void *aux);
};