diff --git a/proto/p4/v1/p4runtime.proto b/proto/p4/v1/p4runtime.proto index 1787f5ce..f014447f 100755 --- a/proto/p4/v1/p4runtime.proto +++ b/proto/p4/v1/p4runtime.proto @@ -714,6 +714,28 @@ message ForwardingPipelineConfig { uint64 cookie = 1; } Cookie cookie = 3; + // Optional: Translations for `@p4runtime_translation`-annotated types, keyed + // by the unique resource identifiers (URIs) of the types. + map p4runtime_translation_by_uri = 4; +} + +message P4RuntimeTranslation { + // Specifies the mapping between values in P4 and values in P4Runtime for + // some type annotated with a `@p4runtime_translation`. + oneof translation { + // Static mapping, given by an explicit, reversible (injective) map. + Static static = 1; + // Dynamic mapping, to be generated by the switch lazily at runtime. + // Whenever a P4Runtime value is seen by the switch for the first time, it + // is mapped to a fresh P4 value; this mapping is then persisted and applied + // to all further occurrences of the P4Runtime value. + Dynmaic dynamic = 2; + } + + message Static { + map p4_value_by_p4runtime_value = 1; + } + message Dynamic {} } message GetForwardingPipelineConfigRequest {