Using static l2 flood group key
Change-Id: I1a61403fb80ec2f8b6d346d74c5a673fae2a22c5
diff --git a/drivers/default/src/main/java/org/onosproject/driver/pipeline/Ofdpa2GroupHandler.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/Ofdpa2GroupHandler.java
index 0535ca3..fe605e9 100644
--- a/drivers/default/src/main/java/org/onosproject/driver/pipeline/Ofdpa2GroupHandler.java
+++ b/drivers/default/src/main/java/org/onosproject/driver/pipeline/Ofdpa2GroupHandler.java
@@ -696,7 +696,7 @@
// assemble info for l2 flood group. Since there can be only one flood
// group for a vlan, its index is always the same - 0
Integer l2floodgroupId = L2_FLOOD_TYPE | (vlanId.toShort() << 16);
- int l2floodgk = getNextAvailableIndex();
+ int l2floodgk = l2FloodGroupKey(vlanId);
final GroupKey l2floodgroupkey =
new DefaultGroupKey(Ofdpa2Pipeline.appKryo.serialize(l2floodgk));
@@ -741,6 +741,11 @@
});
}
+ private int l2FloodGroupKey(VlanId vlanId) {
+ int hash = Objects.hash(deviceId, vlanId);
+ return L2_FLOOD_TYPE | TYPE_MASK & hash;
+ }
+
private void createL3MulticastGroup(NextObjective nextObj, VlanId vlanId,
List<GroupInfo> groupInfos) {
List<GroupBucket> l3McastBuckets = new ArrayList<>();