Prevent XConnect loop
Change-Id: I65c52342840ebef944a65b8c6f65a33448da59cf
diff --git a/drivers/default/src/main/java/org/onosproject/driver/pipeline/ofdpa/OfdpaGroupHandlerUtility.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/ofdpa/OfdpaGroupHandlerUtility.java
index 016299c..217595f 100644
--- a/drivers/default/src/main/java/org/onosproject/driver/pipeline/ofdpa/OfdpaGroupHandlerUtility.java
+++ b/drivers/default/src/main/java/org/onosproject/driver/pipeline/ofdpa/OfdpaGroupHandlerUtility.java
@@ -73,6 +73,7 @@
protected static final int MPLS_L3VPN_SUBTYPE = 0x92000000;
protected static final int L3_ECMP_TYPE = 0x70000000;
protected static final int L2_FLOOD_TYPE = 0x40000000;
+ protected static final int L2_MULTICAST_TYPE = 0x30000000;
protected static final int TYPE_MASK = 0x0fffffff;
protected static final int SUBTYPE_MASK = 0x00ffffff;
@@ -448,6 +449,12 @@
return new DefaultGroupKey(Ofdpa2Pipeline.appKryo.serialize(hash));
}
+ public static GroupKey l2MulticastGroupKey(VlanId vlanId, DeviceId deviceId) {
+ int hash = Objects.hash(deviceId, vlanId);
+ hash = L2_MULTICAST_TYPE | TYPE_MASK & hash;
+ return new DefaultGroupKey(Ofdpa2Pipeline.appKryo.serialize(hash));
+ }
+
public static int l2GroupId(VlanId vlanId, long portNum) {
return L2_INTERFACE_TYPE | (vlanId.toShort() << 16) | (int) portNum;
}