|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.floodlightcontroller.flowcache.PortDownReconciliation
public class PortDownReconciliation
Flow reconciliation module that is triggered by PORT_DOWN events. This module will recursively trace back all flows from the immediately affected switch and remove them (specifically flows with an idle timeout that would not be exhausted). Once the flows are deleted Floodlight will re-evaluate the path the traffic should take with it's updated topology map.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface net.floodlightcontroller.core.IListener |
---|
IListener.Command |
Field Summary | |
---|---|
protected FloodlightContext |
cntx
|
protected IFloodlightProviderService |
floodlightProvider
|
protected IFlowReconcileService |
frm
|
protected ILinkDiscoveryService |
lds
|
protected java.util.Map<Link,LinkInfo> |
links
|
protected static org.slf4j.Logger |
log
|
protected int |
statsQueryXId
|
protected static java.util.List<OFFlowStatisticsReply> |
statsReply
|
protected ITopologyService |
topology
|
protected static boolean |
waiting
|
Constructor Summary | |
---|---|
PortDownReconciliation()
|
Method Summary | |
---|---|
void |
clearFlowMods(IOFSwitch sw,
java.lang.Integer outPort)
|
void |
clearFlowMods(IOFSwitch sw,
OFMatch match,
java.lang.Integer outPort)
|
void |
deleteInvalidFlows(IOFSwitch sw,
java.util.Map<java.lang.Integer,java.util.List<OFMatch>> invalidOutportAndMatch)
Deletes flows with similar matches and output action ports on the specified switch |
java.util.List<OFFlowStatisticsReply> |
getFlows(IOFSwitch sw,
java.lang.Integer outPort)
|
java.util.Collection<java.lang.Class<? extends IFloodlightService>> |
getModuleDependencies()
Get a list of Modules that this module depends on. |
java.util.Collection<java.lang.Class<? extends IFloodlightService>> |
getModuleServices()
Return the list of interfaces that this module implements. |
java.lang.String |
getName()
The name assigned to this listener |
java.util.Map<java.lang.Class<? extends IFloodlightService>,IFloodlightService> |
getServiceImpls()
Instantiate (as needed) and return objects that implement each of the services exported by this module. |
void |
init(FloodlightModuleContext context)
This is a hook for each module to do its internal initialization, e.g., call setService(context.getService("Service")) All module dependencies are resolved when this is called, but not every module is initialized. |
boolean |
isCallbackOrderingPostreq(OFType type,
java.lang.String name)
Check if the module called name is a callback ordering post-requisite for this module. |
boolean |
isCallbackOrderingPrereq(OFType type,
java.lang.String name)
Check if the module called name is a callback ordering prerequisite for this module. |
IListener.Command |
reconcileFlows(java.util.ArrayList<OFMatchReconcile> ofmRcList)
Base case for the reconciliation of flows. |
void |
startUp(FloodlightModuleContext context)
This is a hook for each module to do its external initializations, e.g., register for callbacks or query for state in other modules It is expected that this function will not block and that modules that want non-event driven CPU will spawn their own threads. |
void |
topologyChanged(java.util.List<ILinkDiscovery.LDUpdate> appliedUpdates)
Happens when the switch clusters are recomputed |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static org.slf4j.Logger log
protected ITopologyService topology
protected IFloodlightProviderService floodlightProvider
protected IFlowReconcileService frm
protected ILinkDiscoveryService lds
protected java.util.Map<Link,LinkInfo> links
protected FloodlightContext cntx
protected static boolean waiting
protected int statsQueryXId
protected static java.util.List<OFFlowStatisticsReply> statsReply
Constructor Detail |
---|
public PortDownReconciliation()
Method Detail |
---|
public void topologyChanged(java.util.List<ILinkDiscovery.LDUpdate> appliedUpdates)
ITopologyListener
topologyChanged
in interface ITopologyListener
public java.util.Collection<java.lang.Class<? extends IFloodlightService>> getModuleServices()
IFloodlightModule
getModuleServices
in interface IFloodlightModule
public java.util.Map<java.lang.Class<? extends IFloodlightService>,IFloodlightService> getServiceImpls()
IFloodlightModule
getServiceImpls
in interface IFloodlightModule
public java.util.Collection<java.lang.Class<? extends IFloodlightService>> getModuleDependencies()
IFloodlightModule
getModuleDependencies
in interface IFloodlightModule
public void init(FloodlightModuleContext context) throws FloodlightModuleException
IFloodlightModule
init
in interface IFloodlightModule
FloodlightModuleException
public void startUp(FloodlightModuleContext context)
IFloodlightModule
startUp
in interface IFloodlightModule
public java.lang.String getName()
IListener
getName
in interface IListener<OFType>
public boolean isCallbackOrderingPrereq(OFType type, java.lang.String name)
IListener
isCallbackOrderingPrereq
in interface IListener<OFType>
type
- the object type to which this appliesname
- the name of the module
public boolean isCallbackOrderingPostreq(OFType type, java.lang.String name)
IListener
isCallbackOrderingPostreq
in interface IListener<OFType>
type
- the object type to which this appliesname
- the name of the module
public IListener.Command reconcileFlows(java.util.ArrayList<OFMatchReconcile> ofmRcList)
reconcileFlows
in interface IFlowReconcileListener
ofmRcList
- input flow matches, to be updated to be consistent with
the policies of this reconciler
Additional OFMatch-es can be added to the "list" as
needed.
For example after a new ACL application, one flow-match
may result in multiple flow-matches
The method must also update the ReconcileAction
member in ofmRcList entries to indicate if the
flow needs to be modified, deleted or left unchanged
OR of a new entry is to be added after flow
reconciliation
public java.util.List<OFFlowStatisticsReply> getFlows(IOFSwitch sw, java.lang.Integer outPort)
sw
- the switch object that we wish to get flows fromoutPort
- the output action port we wish to find flows with
public void clearFlowMods(IOFSwitch sw, java.lang.Integer outPort)
sw
- The switch we wish to remove flows fromoutPort
- The specific Output Action OutPort of specific flows we wish
to deletepublic void clearFlowMods(IOFSwitch sw, OFMatch match, java.lang.Integer outPort)
sw
- The switch we wish to remove flows frommatch
- The specific OFMatch object of specific flows we wish to
deleteoutPort
- The specific Output Action OutPort of specific flows we wish
to deletepublic void deleteInvalidFlows(IOFSwitch sw, java.util.Map<java.lang.Integer,java.util.List<OFMatch>> invalidOutportAndMatch)
sw
- the switch to query flows onmatch
- the problematic OFMatch from the base switch which we wish to
find and removeoutPort
- the output action port wanted from the flows, which follows
the route to the base switch
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |