OPNFLWPLUG-991 : FRM: Flow Group Dependency support 31/73531/9
authorgobinath <gobinath@ericsson.com>
Thu, 28 Jun 2018 12:09:39 +0000 (17:39 +0530)
committergobinath <gobinath@ericsson.com>
Wed, 1 Aug 2018 10:45:24 +0000 (16:15 +0530)
commitc65acd71e2a1518afa44abaddb06037c61c2adac
treeb6c08a26bd74df4d6c5549bc55eaa4d15641660a
parent82796af0a0c232ba193f11744b7ca8e3cdd8125d
OPNFLWPLUG-991 : FRM: Flow Group Dependency support

Issue:

Flows can be pointing to only the groups which are already programmed
so these referred groups have to be pushed before the flow programming.

When applications creates new groups and flows pointing to it and write
to the inventory DS, the programming of the groups before flows
is not gauranteed as these DTCN events are processed in separate
threads (FlowForwarder and GroupForwarder).

So, sometimes the flow push by the FRM lands in before the group programming
which would be promptly rejected by the switch.

Fix:

This issue could be solved by checking by maintaining a cache containing
all the active groups per node. So whenever we get a DTCN to push flows
we could ensure that the group pointed to by the flow is already programmed.
In case the group is absent, the referred group is read from the inventory DS
using the nodeId, is programmed first and then the dependent flow is pushed
thereafter.

To avoid back-pressuring the DS, these checks and the subsequent flow/group programming
job is submitted to the nodeconfigurator which then executes these tasks
parallely.

Change-Id: Ia13d4c09bb8d746c94067d23e742eee491ef9a91
Signed-off-by: gobinath <gobinath@ericsson.com>
16 files changed:
applications/forwardingrules-manager/pom.xml
applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/ActionType.java [new file with mode: 0644]
applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/ForwardingRulesManager.java
applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/NodeConfigurator.java [new file with mode: 0644]
applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/AbstractListeningCommiter.java
applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/DevicesGroupRegistry.java [new file with mode: 0644]
applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/FlowForwarder.java
applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/FlowNodeReconciliationImpl.java
applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/ForwardingRulesManagerImpl.java
applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/GroupForwarder.java
applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/nodeconfigurator/JobEntry.java [new file with mode: 0644]
applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/nodeconfigurator/JobQueue.java [new file with mode: 0644]
applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/nodeconfigurator/NodeConfiguratorImpl.java [new file with mode: 0644]
applications/forwardingrules-manager/src/test/java/test/mock/FlowListenerTest.java
applications/forwardingrules-manager/src/test/java/test/mock/GroupListenerTest.java
applications/forwardingrules-manager/src/test/java/test/mock/util/FRMTest.java