Package io.github.zhh2001.jp4.pipeline
Class ActionProfileInfo
java.lang.Object
io.github.zhh2001.jp4.pipeline.ActionProfileInfo
Read-only metadata for one P4 action profile, derived from P4Info.
Construction is internal to
P4Info.fromBytes(byte[]) and friends;
users obtain instances through P4Info.actionProfile(String).
An action profile is the indirect-action mechanism for tables: instead of
binding an action inline on every entry, a table can reference one or more
pre-configured action profile members (or groups of members when
withSelector() is true). The tableIds() set lists which
tables share this profile.
The selector_size_semantics field added in newer P4Info revisions
is intentionally not exposed in v1.4; it can be added in a future v1.x
release without affecting the existing surface.
Instances are constructed once during P4Info parsing and are immutable thereafter; safe to share across threads.
- Since:
- 1.4.0
-
Method Summary
Modifier and TypeMethodDescriptionintid()P4Runtime numeric id assigned by p4c.intMaximum weighted member entries per group;0when the profile does not use a selector.name()Fully-qualified action-profile name, e.g.longsize()Maximum total member entries the profile can hold; ifwithSelector()is true the semantics depend on the target's selector_size_semantics.tableIds()Immutable set of table ids that share this action profile.toString()booleanTrue iff the action profile uses dynamic selection (action selector).
-
Method Details
-
name
Fully-qualified action-profile name, e.g."MyIngress.ecmp_profile". -
id
public int id()P4Runtime numeric id assigned by p4c. -
withSelector
public boolean withSelector()True iff the action profile uses dynamic selection (action selector). -
size
public long size()Maximum total member entries the profile can hold; ifwithSelector()is true the semantics depend on the target's selector_size_semantics. -
maxGroupSize
public int maxGroupSize()Maximum weighted member entries per group;0when the profile does not use a selector. -
tableIds
Immutable set of table ids that share this action profile. -
toString
-