CORD-367 L2 bridging and L3 routing support with internal VLANs in OF-DPA.
Also includes:
All forwarding in app is now via nextObjectives (not treatments) - Spring Open driver converts
non-ECMP forwarding to flow-actions, while OF-DPA driver continues to use groups.
Convert 'setMeta' methods to 'withMeta' in Flow Objectives API.
Bug fix in Flow Objective Manager - set of PendingNext is now threadsafe.
Bug fix in ArpHandler - now recognizes routerIp in addition to gatewayIps
Removed a bunch of testcode
Added group count in CLI
Change-Id: Id3b879c5dda78151ca0ec359179f1604066d39fc
diff --git a/core/api/src/main/java/org/onosproject/net/flowobjective/DefaultFilteringObjective.java b/core/api/src/main/java/org/onosproject/net/flowobjective/DefaultFilteringObjective.java
index 06305bf..4d9d722 100644
--- a/core/api/src/main/java/org/onosproject/net/flowobjective/DefaultFilteringObjective.java
+++ b/core/api/src/main/java/org/onosproject/net/flowobjective/DefaultFilteringObjective.java
@@ -196,7 +196,7 @@
}
@Override
- public Builder setMeta(TrafficTreatment treatment) {
+ public Builder withMeta(TrafficTreatment treatment) {
this.meta = treatment;
return this;
}
diff --git a/core/api/src/main/java/org/onosproject/net/flowobjective/DefaultNextObjective.java b/core/api/src/main/java/org/onosproject/net/flowobjective/DefaultNextObjective.java
index 4701589..bd58050 100644
--- a/core/api/src/main/java/org/onosproject/net/flowobjective/DefaultNextObjective.java
+++ b/core/api/src/main/java/org/onosproject/net/flowobjective/DefaultNextObjective.java
@@ -181,7 +181,7 @@
}
@Override
- public Builder setMeta(TrafficSelector meta) {
+ public Builder withMeta(TrafficSelector meta) {
this.meta = meta;
return this;
}
diff --git a/core/api/src/main/java/org/onosproject/net/flowobjective/FilteringObjective.java b/core/api/src/main/java/org/onosproject/net/flowobjective/FilteringObjective.java
index 29257c6..8ed793d 100644
--- a/core/api/src/main/java/org/onosproject/net/flowobjective/FilteringObjective.java
+++ b/core/api/src/main/java/org/onosproject/net/flowobjective/FilteringObjective.java
@@ -133,7 +133,7 @@
* @param treatment traffic treatment to use
* @return a filtering builder
*/
- Builder setMeta(TrafficTreatment treatment);
+ Builder withMeta(TrafficTreatment treatment);
/**
* Assigns an application id.
diff --git a/core/api/src/main/java/org/onosproject/net/flowobjective/NextObjective.java b/core/api/src/main/java/org/onosproject/net/flowobjective/NextObjective.java
index 08916eb..36098d7 100644
--- a/core/api/src/main/java/org/onosproject/net/flowobjective/NextObjective.java
+++ b/core/api/src/main/java/org/onosproject/net/flowobjective/NextObjective.java
@@ -147,7 +147,7 @@
* @param selector match conditions
* @return an objective builder
*/
- Builder setMeta(TrafficSelector selector);
+ Builder withMeta(TrafficSelector selector);
/**
* Builds the next objective that will be added.
diff --git a/core/net/src/main/java/org/onosproject/net/flowobjective/impl/FlowObjectiveManager.java b/core/net/src/main/java/org/onosproject/net/flowobjective/impl/FlowObjectiveManager.java
index 5ecdc7a..33200b1 100644
--- a/core/net/src/main/java/org/onosproject/net/flowobjective/impl/FlowObjectiveManager.java
+++ b/core/net/src/main/java/org/onosproject/net/flowobjective/impl/FlowObjectiveManager.java
@@ -16,7 +16,6 @@
package org.onosproject.net.flowobjective.impl;
import com.google.common.collect.Maps;
-import com.google.common.collect.Sets;
import org.apache.felix.scr.annotations.Activate;
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Deactivate;
@@ -53,9 +52,11 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.util.Collections;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutorService;
import static com.google.common.base.Preconditions.checkNotNull;
@@ -228,8 +229,10 @@
flowObjectiveStore.getNextGroup(fwd.nextId()) == null) {
log.trace("Queuing forwarding objective for nextId {}", fwd.nextId());
// TODO: change to computeIfAbsent
- Set<PendingNext> pnext = pendingForwards.putIfAbsent(fwd.nextId(),
- Sets.newHashSet(new PendingNext(deviceId, fwd)));
+ Set<PendingNext> newset = Collections.newSetFromMap(
+ new ConcurrentHashMap<PendingNext, Boolean>());
+ newset.add(new PendingNext(deviceId, fwd));
+ Set<PendingNext> pnext = pendingForwards.putIfAbsent(fwd.nextId(), newset);
if (pnext != null) {
pnext.add(new PendingNext(deviceId, fwd));
}
diff --git a/core/store/dist/src/main/java/org/onosproject/store/group/impl/DistributedGroupStore.java b/core/store/dist/src/main/java/org/onosproject/store/group/impl/DistributedGroupStore.java
index 83319c3..cc32a73 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/group/impl/DistributedGroupStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/group/impl/DistributedGroupStore.java
@@ -350,7 +350,7 @@
// Check if a group is existing with the same key
Group existingGroup = getGroup(groupDesc.deviceId(), groupDesc.appCookie());
if (existingGroup != null) {
- log.warn("Group already exists with the same key {} in dev:{} with id:{}",
+ log.warn("Group already exists with the same key {} in dev:{} with id:0x{}",
groupDesc.appCookie(), groupDesc.deviceId(),
Integer.toHexString(existingGroup.id().id()));
return;