- Current Flow Programmer Service code in protocol_plugins.openflow
instructs the switch to report the flow removal event to the controller
only for hard or idle timeout flows, during flowmod message creation.
Nevrekar pointed out in some switches a removal of openflow flows may
be done by other entities. So in order for the app on top of controller
to get to know about this flow deletions, we are here enabling the flow
removal event report from the switch for all controller installed flows.
Change-Id: Iae2f7716b592269fd09c4e2fa4a18ae274367f9d
Signed-off-by: Alessandro Boch <aboch@cisco.com>
if (port != null) {
((OFFlowMod) fm).setOutPort(port);
}
if (port != null) {
((OFFlowMod) fm).setOutPort(port);
}
- if (command == OFFlowMod.OFPFC_ADD
- || command == OFFlowMod.OFPFC_MODIFY
+ if (command == OFFlowMod.OFPFC_ADD || command == OFFlowMod.OFPFC_MODIFY
|| command == OFFlowMod.OFPFC_MODIFY_STRICT) {
|| command == OFFlowMod.OFPFC_MODIFY_STRICT) {
- if (flow.getIdleTimeout() != 0 || flow.getHardTimeout() != 0) {
- // Instruct switch to let controller know when flow expires
- ((OFFlowMod) fm).setFlags((short) 1);
- }
+ // Instruct switch to let controller know when flow is removed
+ ((OFFlowMod) fm).setFlags((short) 1);
}
} else {
((V6FlowMod) fm).setVendor();
}
} else {
((V6FlowMod) fm).setVendor();
if (port != null) {
((V6FlowMod) fm).setOutPort(port);
}
if (port != null) {
((V6FlowMod) fm).setOutPort(port);
}
- if (command == OFFlowMod.OFPFC_ADD
- || command == OFFlowMod.OFPFC_MODIFY
+ if (command == OFFlowMod.OFPFC_ADD || command == OFFlowMod.OFPFC_MODIFY
|| command == OFFlowMod.OFPFC_MODIFY_STRICT) {
|| command == OFFlowMod.OFPFC_MODIFY_STRICT) {
- if (flow.getIdleTimeout() != 0 || flow.getHardTimeout() != 0) {
- // Instruct switch to let controller know when flow expires
- ((V6FlowMod) fm).setFlags((short) 1);
- }
+ // Instruct switch to let controller know when flow is removed
+ ((V6FlowMod) fm).setFlags((short) 1);
}
}
logger.trace("Openflow Match: {} Openflow Actions: {}", ofMatch,
}
}
logger.trace("Openflow Match: {} Openflow Actions: {}", ofMatch,