Skip to content

Commit

Permalink
[AETHER-514] Fix the previous patch (PR #100) (#114)
Browse files Browse the repository at this point in the history
* [AETHER-514] Fix the previous patch (PR #100)

In the previous patch (PR #100), a "break" was missed when the code has been ported from ONOS.
Additionally, makes a further optimization: does not send hashed and next_vlan flows.

* Updates ONOS deps and re-add "fail" instruction that was wrongly removed.
  • Loading branch information
pierventre authored Oct 22, 2020
1 parent f3f9ed1 commit 155c142
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ SPDX-License-Identifier: Apache-2.0
<parent>
<groupId>org.onosproject</groupId>
<artifactId>onos-dependencies</artifactId>
<version>2.2.6</version>
<version>2.2.7-b2</version>
</parent>

<groupId>org.stratumproject</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ public void next(NextObjective obj) {
if (log.isTraceEnabled()) {
log.trace("Objective {}", obj);
}
fail(obj, ObjectiveError.UNSUPPORTED);
return;
}

Expand Down Expand Up @@ -253,6 +254,7 @@ private void processGroups(Objective objective, Collection<GroupDescription> gro
groups.forEach(group -> groupService.setBucketsForGroup(
deviceId, group.appCookie(), group.buckets(),
group.appCookie(), group.appId()));
break;
case REMOVE_FROM_EXISTING:
groups.forEach(group -> groupService.removeBucketsFromGroup(
deviceId, group.appCookie(), group.buckets(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -484,10 +484,12 @@ private TrafficTreatment getFirstDefaultNextTreatmentIfAny(
}

private boolean isGroupModifyOp(NextObjective obj) {
// If operation is ADD_TO_EXIST or REMOVE_FROM_EXIST, it means we modify
// If operation is ADD_TO_EXIST, REMOVE_FROM_EXIST or MODIFY, it means we modify
// group buckets only, no changes for flow rules.
// FIXME Please note that for MODIFY op this could not apply in future if we extend the scope of MODIFY
return obj.op() == Objective.Operation.ADD_TO_EXISTING ||
obj.op() == Objective.Operation.REMOVE_FROM_EXISTING;
obj.op() == Objective.Operation.REMOVE_FROM_EXISTING ||
obj.op() == Objective.Operation.MODIFY;
}

private boolean isXconnect(NextObjective obj) {
Expand Down

0 comments on commit 155c142

Please sign in to comment.