From 1debc6dc882e1921cf57ed4bb755641b3e9df94a Mon Sep 17 00:00:00 2001 From: Shashidhar Raja Date: Fri, 13 Jul 2018 18:28:44 +0530 Subject: [PATCH] NETVIRT-1369: Conntrack headers are not removed ct_clear was not used with ct submit in tables 217 and 247. This was causing failures when same data packets were punted to ODL controller. Updated ACL to add ct_clear with ct submit in tables 217 and 247. Change-Id: Ic74218b8a649796f85c2e606698d8823286d89ad Signed-off-by: Shashidhar Raja --- .../netvirt/aclservice/AbstractAclServiceImpl.java | 2 ++ .../aclservice/tests/FlowEntryObjectsStateful.xtend | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/aclservice/impl/src/main/java/org/opendaylight/netvirt/aclservice/AbstractAclServiceImpl.java b/aclservice/impl/src/main/java/org/opendaylight/netvirt/aclservice/AbstractAclServiceImpl.java index 38e19785d2..5ccdece5e6 100644 --- a/aclservice/impl/src/main/java/org/opendaylight/netvirt/aclservice/AbstractAclServiceImpl.java +++ b/aclservice/impl/src/main/java/org/opendaylight/netvirt/aclservice/AbstractAclServiceImpl.java @@ -31,6 +31,7 @@ import org.opendaylight.genius.mdsalutil.MatchInfoBase; import org.opendaylight.genius.mdsalutil.NwConstants; import org.opendaylight.genius.mdsalutil.actions.ActionNxConntrack; import org.opendaylight.genius.mdsalutil.actions.ActionNxConntrack.NxCtAction; +import org.opendaylight.genius.mdsalutil.actions.ActionNxCtClear; import org.opendaylight.genius.mdsalutil.actions.ActionNxResubmit; import org.opendaylight.genius.mdsalutil.instructions.InstructionApplyActions; import org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager; @@ -963,6 +964,7 @@ public abstract class AbstractAclServiceImpl implements AclServiceListener { List ctActionsList = Lists.newArrayList(new ActionNxConntrack.NxCtMark(AclConstants.CT_MARK_EST_STATE)); actionsInfos.add(new ActionNxConntrack(2, 1, 0, elanId.intValue(), (short) 255, ctActionsList)); + actionsInfos.add(new ActionNxCtClear()); } List instructions = getDispatcherTableResubmitInstructions(actionsInfos); diff --git a/aclservice/impl/src/test/java/org/opendaylight/netvirt/aclservice/tests/FlowEntryObjectsStateful.xtend b/aclservice/impl/src/test/java/org/opendaylight/netvirt/aclservice/tests/FlowEntryObjectsStateful.xtend index 267a23db98..6466aeb50e 100644 --- a/aclservice/impl/src/test/java/org/opendaylight/netvirt/aclservice/tests/FlowEntryObjectsStateful.xtend +++ b/aclservice/impl/src/test/java/org/opendaylight/netvirt/aclservice/tests/FlowEntryObjectsStateful.xtend @@ -11,6 +11,7 @@ import org.opendaylight.genius.mdsalutil.MetaDataUtil import org.opendaylight.genius.mdsalutil.NwConstants import org.opendaylight.genius.mdsalutil.actions.ActionDrop import org.opendaylight.genius.mdsalutil.actions.ActionNxConntrack +import org.opendaylight.genius.mdsalutil.actions.ActionNxCtClear import org.opendaylight.genius.mdsalutil.actions.ActionNxResubmit import org.opendaylight.genius.mdsalutil.instructions.InstructionApplyActions import org.opendaylight.genius.mdsalutil.instructions.InstructionGotoTable @@ -2073,6 +2074,7 @@ class FlowEntryObjectsStateful extends FlowEntryObjectsBase { new ActionNxConntrack(2, 1, 0, 5000, 255 as short, Collections.singletonList(new ActionNxConntrack.NxCtMark(AclConstants.CT_MARK_EST_STATE)) ), + new ActionNxCtClear(), new ActionNxResubmit(220 as short) ]) ] @@ -2094,6 +2096,7 @@ class FlowEntryObjectsStateful extends FlowEntryObjectsBase { new ActionNxConntrack(2, 1, 0, 5000, 255 as short, Collections.singletonList(new ActionNxConntrack.NxCtMark(AclConstants.CT_MARK_EST_STATE)) ), + new ActionNxCtClear(), new ActionNxResubmit(220 as short) ]) ] @@ -2115,6 +2118,7 @@ class FlowEntryObjectsStateful extends FlowEntryObjectsBase { new ActionNxConntrack(2, 1, 0, 5000, 255 as short, Collections.singletonList(new ActionNxConntrack.NxCtMark(AclConstants.CT_MARK_EST_STATE)) ), + new ActionNxCtClear(), new ActionNxResubmit(17 as short) ]) ] @@ -2135,6 +2139,7 @@ class FlowEntryObjectsStateful extends FlowEntryObjectsBase { new ActionNxConntrack(2, 1, 0, 5000, 255 as short, Collections.singletonList(new ActionNxConntrack.NxCtMark(AclConstants.CT_MARK_EST_STATE)) ), + new ActionNxCtClear(), new ActionNxResubmit(17 as short) ]) ] @@ -2261,6 +2266,7 @@ class FlowEntryObjectsStateful extends FlowEntryObjectsBase { Collections.singletonList(new ActionNxConntrack.NxCtMark(AclConstants.CT_MARK_EST_STATE) ) ), + new ActionNxCtClear(), new ActionNxResubmit(220 as short) ]) ] @@ -2282,6 +2288,7 @@ class FlowEntryObjectsStateful extends FlowEntryObjectsBase { new ActionNxConntrack(2, 1, 0, 5000, 255 as short, Collections.singletonList(new ActionNxConntrack.NxCtMark(AclConstants.CT_MARK_EST_STATE)) ), + new ActionNxCtClear(), new ActionNxResubmit(220 as short) ]) ] @@ -2310,6 +2317,7 @@ class FlowEntryObjectsStateful extends FlowEntryObjectsBase { new ActionNxConntrack(2, 1, 0, 5000, 255 as short, Collections.singletonList(new ActionNxConntrack.NxCtMark(AclConstants.CT_MARK_EST_STATE)) ), + new ActionNxCtClear(), new ActionNxResubmit(17 as short) ]) ] @@ -2330,6 +2338,7 @@ class FlowEntryObjectsStateful extends FlowEntryObjectsBase { new ActionNxConntrack(2, 1, 0, 5000, 255 as short, Collections.singletonList(new ActionNxConntrack.NxCtMark(AclConstants.CT_MARK_EST_STATE)) ), + new ActionNxCtClear(), new ActionNxResubmit(17 as short) ]) ] -- 2.36.6