Various fixes for P4Runtime group handling
- Workaround for PI bug that ignores max_group_size
- Use max_group_size and not buckets size when translating groups
Change-Id: Id12a12311b20ca8fb4e785e1c5a4f0f4215d1bbf
diff --git a/core/api/src/main/java/org/onosproject/net/pi/runtime/PiActionProfileGroup.java b/core/api/src/main/java/org/onosproject/net/pi/runtime/PiActionProfileGroup.java
index 3fd7e08..f8036f5 100644
--- a/core/api/src/main/java/org/onosproject/net/pi/runtime/PiActionProfileGroup.java
+++ b/core/api/src/main/java/org/onosproject/net/pi/runtime/PiActionProfileGroup.java
@@ -111,7 +111,11 @@
final PiActionProfileGroup other = (PiActionProfileGroup) obj;
return Objects.equal(this.groupId, other.groupId)
&& Objects.equal(this.members, other.members)
- && Objects.equal(this.maxSize, other.maxSize)
+ // FIXME: re-enable when this PI bug will be fixed:
+ // https://github.com/p4lang/PI/issues/452
+ // Currently PI-based devices always return max_group_size 0,
+ // event if we set a different one.
+ // && Objects.equal(this.maxSize, other.maxSize)
&& Objects.equal(this.actionProfileId, other.actionProfileId);
}
diff --git a/core/api/src/main/java/org/onosproject/net/pi/runtime/PiEntity.java b/core/api/src/main/java/org/onosproject/net/pi/runtime/PiEntity.java
index 531a6a2..1d1e7e0 100644
--- a/core/api/src/main/java/org/onosproject/net/pi/runtime/PiEntity.java
+++ b/core/api/src/main/java/org/onosproject/net/pi/runtime/PiEntity.java
@@ -20,8 +20,7 @@
import org.onosproject.net.DeviceId;
/**
- * Abstraction of an entity of a protocol-independent that can be read or write
- * at runtime.
+ * Abstraction of a runtime entity of a protocol-independent pipeline.
*/
@Beta
public interface PiEntity {