Skip to content

Commit 000e465

Browse files
daniele-moroccascone
authored andcommitted
Trigger the removal of double tagged rules
Trigger the driver to remove the double tagged rules (fwd classifier) when removing the flow objective and no other host is connected to the same port Change-Id: I83d50f9b3404f2eaa733cc0c75f76bfe3562b5e8 (cherry picked from commit 7c4534c)
1 parent e9ba39c commit 000e465

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/RoutingRulePopulator.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1147,7 +1147,13 @@ private FilteringObjective.Builder buildFilteringObjective(DeviceId deviceId, Po
11471147
*/
11481148
void processDoubleTaggedFilter(DeviceId deviceId, PortNumber portNum, VlanId outerVlan,
11491149
VlanId innerVlan, boolean install) {
1150-
FilteringObjective.Builder fob = buildDoubleTaggedFilteringObj(deviceId, portNum, outerVlan, innerVlan, false);
1150+
// We should trigger the removal of double tagged rules only when removing
1151+
// the filtering objective and no other hosts are connected to the same device port.
1152+
boolean cleanupDoubleTaggedRules = srManager.hostService
1153+
.getConnectedHosts(new ConnectPoint(deviceId, portNum)).size() == 0 && !install;
1154+
FilteringObjective.Builder fob = buildDoubleTaggedFilteringObj(deviceId, portNum,
1155+
outerVlan, innerVlan,
1156+
cleanupDoubleTaggedRules);
11511157
if (fob == null) {
11521158
// error encountered during build
11531159
return;

0 commit comments

Comments
 (0)