Proto commits in p4lang/PI

These 93 commits are when the Protocol Buffers files have changed:

Commit:17802cf
Author:Andy Fingerhut
Committer:GitHub

Add SPDX license id lines to source files (#618) * Add SPDX license id lines to source files Signed-off-by: Andy Fingerhut <andy.fingerhut@gmail.com> * Try removing comments from Makefile.am files to see if that fixes Bazel build Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu> * Restore include/Makefile.am back to its original contents Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu> * Make one SPDX's comment prefix fit in with its environment better. Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu> * Temporarily pin Bazel build in CI to Ubuntu 22.04 Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu> --------- Signed-off-by: Andy Fingerhut <andy.fingerhut@gmail.com> Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu>

The documentation is generated from this commit.

Commit:33e15ea
Author:Antonin Bas
Committer:Antonin Bas

Support dynamic configuration for P4Runtime implementation The server now exposes a new gRPC service that allows changing some configuration parameters of the P4Runtime implementation. At the moment we only support enabling / disabling stream error-reporting (recently added to the P4Runtime specification). For software that consumes DeviceMgr directly and does not use the server code included in this project, we have added a new method to the DeviceMgr PIMPL which enables updating the configuration. This change also implements support for stream error-reporting (when enabled through the configuration mechanism described above). At the moment we only report errors for invalid PacketOut messages. StreamError messages could have been "injected in the stream" in 3 different places: (1) in the PacketIOMgr, (2) in the DeviceMgr, or (3) in the DeviceMgr client. In this patch we went with (2) to avoid changing the DeviceMgr interface (3) and to avoid making the assumption that components which handle PacketOut messages must also have the ability to send PacketIn messages (1), even though this is currently the case for all the components we have. The P4Runtime spec states that StreamError messages may be dropped if the StreamChannel is too busy. We consider that this is not the responsibility of DeviceMgr, but of the DeviceMgr client (e.g. P4Runtime service implementation). This is probably a good idea for the client to implement such a mechanism. Our current P4Runtime service implementation does not, and if a StreamError message needs to be sent to the P4Runtime client, we will not accept a new StreamMessageRequest until the StreamError message is sent. This could impact PacketOut performance, but then again stream error-reporting is only meant to be enabled for debugging purposes.

Commit:ecb4258
Author:Antonin Bas
Committer:Antonin Bas

Remove googleapis submodule The googleapis repository has grown quite big, but we only require 2 small files (status.proto & code.proto). It seems more convenient to copy these files here and not use a submodule at all. This only applies to the automake (non-Bazel) build.

Commit:84c05a4
Author:Antonin Bas
Committer:Antonin Bas

Pull P4Runtime proto files from p4lang/p4runtime The protobuf files, along with the specification Madoko source files, have been moved to p4lang/p4runtime. As a result, we are adding p4lang/p4runtime as a submodule for this repository.

Commit:c0b2ee7
Author:Antonin Bas
Committer:Antonin Bas

Add support for serializable enums in P4Runtime Proposal for supporting P4 serializable enums in P4Runtime. For each serializable enum, P4Info includes the underlying value for each named member of the enum. On the P4Runtime side, P4Data enables providing either the name or the numerical value (it should be possible to provide a value for a serializable enum even if this value does not correspond to named member, as long as the numerical value falls into the range of the underlying representation). See P4_16 spec section 7.2.1 (Enumeration types) for more background on safe enums vs. serializable enums.

Commit:fbb08b9
Author:Antonin Bas
Committer:Antonin Bas

Use NO_TIMEOUT as default value in P4Info For the IdleTimeoutBehavior enum. In proto3, there is no need to use UNSPECIFIED as the default value for enums (for backward-compatibility purposes) as during deserialization, unrecognized enum values will be preserved in the message. NO_TIMEOUT makes sense as the default and it will make debug prints of the messages shorter (since most P4 tables will use NO_TIMEOUT and default values are omitted from the debug prints). Fixes #379

Commit:a010c22
Author:Antonin Bas
Committer:Antonin Bas

Support arbitrary varbits in P4Runtime We include the dynamic size in the P4Data message for varbit types. While we can only think of very few cases where varbits would need to be exposed to the control-plane - and even fewer are realistic - this seems to be the most future-proof approach. Fixes #371

Commit:59c9409
Author:Antonin Bas
Committer:GitHub

Support for arch-specific extensions for tables in P4Runtime (#374) * Support for arch-specific extensions for tables in P4Runtime This introduces support for: - additional architecture-specific match types. This is achieved on the P4Info side by wrapping the match_type field in a oneof, where the alternative is a string specifying the arch-specific match-type name. On the P4Runtime side, we simply add Any as a possible value for the FieldMatch oneof. - ability to extend TableEntry message with Any message field. Fixes #301 * Address review comments

Commit:8442415
Author:Antonin Bas
Committer:Antonin Bas

Add static max group size for action profile to P4Info This information must be known at compile-time. The dynamic group max size provided at hroup creation time is now optional and must never exceed the static max group size when provided. Fixes #366

Commit:775fc97
Author:wmohsin
Committer:Antonin Bas

Update p4runtime.proto with new batch atomicity modes Fixes #324

Commit:cb61c48
Author:Antonin Bas
Committer:GitHub

Remove VALID match type from P4Runtime (#368) * Remove VALID match type from P4Runtime We remove the VALID match type from p4runtime.proto and p4info.proto. The valid match type does not exist in P4_16, which means that the p4c compiler never produces a VALID match type in P4Info even for P4_14 programs, since all P4_14 programs are converted to P4_16 before P4Info is generated. While the change is not backward-compatible since we are deleting Protobuf fields, it should not impact existing Protobuf binaries that do not use VALID, as it does not affect other Protobuf fields (we did not change any of the Protobuf integer field values). The VALID match type is preserved in the PI implementation for now, to ensure backward-compatibility with the bmv2 JSON produced by the legacy compiler (p4c-bm). Fixes #367 * Added more comments to the code as requested by reviewer

Commit:af06c17
Author:Antonin Bas
Committer:GitHub

Add major version number to P4Runtime protobuf packages (#356) * Add major version number to P4Runtime protobuf packages We follow best practices for protobuf cloud services and add the major version number to the package path. This change affects many C++ source files in this project and I didn't find a good way to make the diff smaller by using namespace "tricks". I did introduce namespace aliases (p4rt = ::p4::v1 and p4config = ::p4::config::v1) to make future potential changes easier. Fixes #294 This commit also split p4/p4types.proto into p4/v1/p4data.proto and p4/config/v1/p4types.proto, thus breaking the circular import in golang between the p4 and p4.config packages. Fixes #350 * Use p4v1 and p4configv1 namespace aliases Instead of p4rt and p4config. This is based on a discussion with reviewer @wmohsin about future-proofness, best practices and name collisions. Even though the fact that we were only using namespace aliases in implementation files mean that there should be no name conflicts at link time (namespace aliases are only visible in their translation unit and do not affect the full-qualified name of linker symbols), we decided that in the end it probably was simpler to just include the major version number in the namespace alias. A change in major version number should be a rare and disruptive event, and keeping the diff small when updating the implementation may not be a valid concern. There will be many things to figure out when & if we introduce P4Runtime v2 and it is tough to predict how it will happen and which steps we will follow to roll out the new version.

Commit:d190be3
Author:Samar Abdi
Committer:Antonin Bas

Added support for multiple clones

Commit:f5681d6
Author:samar-abdi
Committer:Antonin Bas

Clarified usage of RECONCILE_AND_COMMIT (#349) * Clarified usage of RECONCILE_AND_COMMIT * Fixed typo about UNIMPLEMENTED

Commit:1ca8006
Author:Antonin Bas
Committer:GitHub

Add support for idle timeout for table entries in P4Runtime (#346) * Add support for idle timeout for table entries in P4Runtime Necessary changes to p4info.proto and p4runtime.proto to support idle timeout for table entries. A table supports idle timeout if the idle_timeout_behavior field in the corresponding P4Info Table message is set to NOTIFY_CONTROL (we assume that this information comes from the P4 table definition, either as a table attribute or as an annotation). When a table supports idle timeout, the P4Runtime client can specifiy a TTL for each TableEntry. This TTL value will be returned to the client during a Read operation. If an entry hasn't been hit in the last TTL nanoseconds, a notification is sent to the client on the StreamChannel. After a notification is sent, the P4Runtime server resets the timer for this entry, which means a new notification will be sent after another TTL nanoseconds if the entry is not hit. This means that it is ok if notifications are "lost" or if the server drops notifications because the channel / client is too busy. When reading a TableEntry, the client can elect to read the elapsed time (in nanoseconds) since the entry was last hit in the data-plane. We use a protobuf message for this field in order to enable the client to choose whether this value should be read and returned in the response. This is consistent with what we do for direct resource fields. We use a repeated field of TableEntry in the notification message so that the server can coalesce notifications in one message when appropriate (we need to define what appropriate means in the spec). This may not be the most comprehensive proposal, but I believe it is sufficient for P4Runtime v1.0 as it covers the general use case. Fixes #265 * Added comment to IdleTimeoutNotification To clarify which fields must be set in table_entry members.

Commit:8cec21d
Author:Antonin Bas
Committer:Antonin Bas

Add missing id prefixes in p4info.proto For PSA externs Register and Digest, as well as for controller packet headers (header types annotated with @controller_header in P4).

Commit:d861ea5
Author:Antonin Bas
Committer:Antonin Bas

Fix typo in comment in p4info.proto s/indentifies/identifies/ Fixes #342

Commit:a2c6151
Author:Antonin Bas
Committer:GitHub

Proposal for PSA Digest support in P4 Runtime (#337) * Proposal for PSA Digest support in P4 Runtime We introduce a DigestList message in the StreamMessageRequest (for notifications) and a DigestListAck message in the StreamMessageResponse (for acks). The ack is necessary to avoid flooding the channel with notifications for the same learned data. The DigestEntry Write entity is only used for configuring the digest. * Addressed some review comments

Commit:456970f
Author:Antonin Bas
Committer:GitHub

Add definition of id prefixes to p4info.proto as enum (#336) * Add definition of id prefixes to p4info.proto as enum Historically ids have shared the same number-space (i.e. all ids for top-level objects are unique). Furthermore, the compiler has been allocating ids in such a way that it is possible to deduce the object types (e.g. table, action, ...) based on the value of the most-significant byte of the id. We decided that it was a bad idea to change that scheme and break existing implementations of P4Runtime. However, it was also decided that we should add an enum to p4info.proto so that these 1-byte values are documented in code somewhere. The compiler should use these values when allocating ids for the P4 objects. * Differentiate between direct and indirect * Fix indentation

Commit:219b3d6
Author:Frank Wang
Committer:Antonin Bas

Minor fix for counter comments in p4runtime.proto

Commit:dbdf90e
Author:Antonin Bas
Committer:GitHub

Support for arbitrary type serialization in P4Runtime (#328) Adds support for arbitrary P4_16 types in P4Runtime, as discussed at the 03/21/2018 WG meeting (refer to minutes). The changes incur minimal overhead for the most-common case (`bit<W>` in P4, for which we use a binary string in P4Runtime), and enable us to support complex types in lookup expressions and PSA externs such as Register and Digest. We include some documentation for the type specifications (P4Info) and value representations (P4Runtime) which can be merged in the main P4Info/P4Runtime specification in the future (before the v1.0 release). To avoid breaking existing implementations, we do not use the new P4Data representation for tables and value-sets.

Commit:c9269f9
Author:Antonin Bas
Committer:GitHub

Wrap indirect resource index in proto message in P4Runtime Wrap indirect resource index in proto message in P4Runtime This ensures that we can distinguish between an unset index (wildcard read / write) and a zero index (first entry in the resource index). Fixes #309

Commit:afd5831
Author:Chris Sommers
Committer:Antonin Bas

Implement #275, #276 - P4Info doc and PkgInfo messages, xform utility. Solution for #275 and #276 + utility + examples * #275 - p4info.proto: Added Document Message to entities and action params * #276 - p4info.proto: Added PkgInfo to top level P4Info * xform_anno.py utility to transform annotations into first-class proto messages and elements * Example p4 source program with annotations * README * A bash script to simplify running a demo

Commit:cc41607
Author:samar-abdi
Committer:Antonin Bas

Added support for Parser Value Set in P4Runtime (#310) * Added support for Parser Value Set. * Updated Value Set Entry proto definition. * Fix typo. * Fix uniqueness and size. * Define priority of matches. * Undefine priority of matches.

Commit:64f0a36
Author:Antonin Bas
Committer:Antonin Bas

Add is_const_table field to p4info.Table message P4 tables with static entries cannot be modified at runtime. It therefore makes sense to expose that property to the control-plane.

Commit:dc2f4c6
Author:wmohsin
Committer:Antonin Bas

Support for multiple controller roles (#286) * Support for multiple controller roles Introduced the notion of controller 'Role' and its use in MasterArbitrationUpdate, WriteRequest and SetForwardingPipelineConfigRequest messages. * Support for multiple controller roles * Minor clarifications and formatting fixes - concept of default role and default role_id (0) - election_id unique to a given role * Updated default role comments Relaxed the hard requirement on non-overlapping role config. Given we have agreed to use protobuf.Any, the base P4Runtime protocol should stay out of this. * Fixed typo

Commit:b655718
Author:dushyantarora13
Committer:Antonin Bas

Removed counter_id and meter_id fields from DirectCounterEntry and DirectMeterEntry respectively.

Commit:a231115
Author:wmohsin
Committer:Antonin Bas

Update p4runtime.proto Remove deprecated code related to {Set|Get}ForwardingPipelineConfig, now that clients have migrated to the new per-device style API.

Commit:b83f8fd
Author:samar-abdi
Committer:Antonin Bas

Add truncate support for clone packets in p4runtime * Added field to support clone truncation. * Added field to support clone truncation. * Clarified unit of clone packet length. * Clarified usage of packet_length_bytes field.

Commit:2e8a3f0
Author:Antonin Bas
Committer:Antonin Bas

Return error in P4 Runtime if priority > 0 for non-TCAM fixes #253

Commit:cd0cafa
Author:samar-abdi
Committer:Antonin Bas

Support for PRE in P4Runtime (#251) * Merged in changes from master. * Added tags to replica message. * Removed typo space. * Addressed PR comments. * Fixed packet replication engine entry type in oneof.

Commit:f0a049b
Author:Sunghwan Yoo
Committer:Antonin Bas

Added p4.Error message for P4Runtime error reporting

Commit:c2ffd4b
Author:Sunghwan Yoo
Committer:Antonin Bas

Incorporated review feedback for p4.Error

Commit:bb45507
Author:samar-abdi
Committer:Antonin Bas

Added RECONCILE_AND_COMMIT action type to SetForwardingPipelineConfig… (#237) * Added RECONCILE_AND_COMMIT action type to SetForwardingPipelineConfigRequest message. * Clarified COMMIT semantics. * Clarified COMMIT semantics. * Minor language edits to clarify realization of a given config.

Commit:88f5ed4
Author:wmohsin
Committer:Antonin Bas

Update p4runtime.proto Removes ActionProfileGroup.type field. In the early P4Runtime days, we added an APG 'type' in a somewhat half-baked way, with the understanding that we will revisit/refine it down the road. We have now come to a consensus that this is a property of the P4 action-selector object, and should not be captured here.

Commit:0c194e8
Author:wmohsin
Committer:Antonin Bas

Update p4runtime.proto (#222) * Update p4runtime.proto Align {Set|Get}ForwardingPipelineConfig RPCs with the rest of the API, which is on a per device basis. This also simplifies error reporting by simply using the top-level grpc status returned. The changes are backwards-compatible, and older fields will be removed once all clients have migrated away from them. * Update p4runtime.proto Fixed field number in conflict.

Commit:2b58981
Author:Samar Abdi

Clarified default action read error.

Commit:7325a0e
Author:samar-abdi
Committer:Antonin Bas

Added default action update flag in TableEntry. (#210) * Added default action update flag in TableEntry. * Fixed default value. * Added documentation for default action update. * Stricter condition on existence of one-of match field specification if field id is present. * Example for don't care match field specification. * Typo, missing closing braces. * Typo, missing closing braces and range match-all.

Commit:fafa4c3
Author:Samar Abdi

Fixed default value.

Commit:f87c221
Author:Samar Abdi

Added default action update flag in TableEntry.

Commit:4d3c3a3
Author:samar-abdi
Committer:Antonin Bas

added clarification regarding default values for direct meter config … (#202) * added clarification regarding default values for direct meter config and counter data. * clarified read for unset meter config. * separated write and read cases. * added comments on direct meter and counter entry messages to clarify their insertion/deletion

Commit:0955a46
Author:wmohsin
Committer:Antonin Bas

Update p4runtime.proto Add election_id to SetForwardingPipelineConfigRequest

Commit:9fc50cd
Author:Antonin Bas
Committer:GitHub

P4runtime direct resource support in TableEntry (#186) * Add meter_config and counter_data to TableEntry These can be used to update / read direct resources associated with a table entry. * For write requests to meters / counters, update must be MODIFY * Updated comment based on reviewers' suggestions * Return UNIMPLEMENTED if meter_config / counter_data used For now...

Commit:8d69209
Author:Antonin Bas
Committer:Antonin Bas

Fix invalid type for device_id in p4runtime.proto Type was uint32 in GetForwardingPipelineConfigRequest. Should be uint64.

Commit:aae3aa5
Author:aghaffarkhah
Committer:Antonin Bas

remove the old packet I/O related fields (#169)

Commit:d009eef
Author:Antonin Bas
Committer:Antonin Bas

Clean-up P4 config update sequence The original PI functions (assign / update_start / update_end / remove) were designed pretty much specifically with bmv2 in mind. As we make progress with p4runtime.proto we move towards a model were the P4 dataplane is pushed by the controller and these functions had to be slightly revisited. The assign function now accepts a NULL pointer for p4info, which means the "device" (e.g. bmv2) was started without an initial P4 configuration. The PI P4Runtime frontend (aka DeviceMgr) was updated to more properly implement SetForwardingPipelineConfig by leveraging the new assign behavior. The gRPC was updated to showcase that new "paradigm": bmv2 simple_switch is started without any JSON (i.e. without any P4 dataplane configuration). The initial configuration has to be pushed by the controller.

Commit:e1ea34c
Author:Antonin Bas
Committer:Antonin Bas

Fix quotation marks in p4info.proto The original ones must have been copied from GDoc

Commit:64327a5
Author:wmohsin
Committer:Antonin Bas

PI-based modeling of controller Packet-IO (#159) * packet-io changes Incorporate PI-based modeling of packet-io. Metadata associated with both Packet-Out and Packet-In will be modeled as P4 headers with special annotation @controller_header("packet_out") and @controller_header("packet_in") respectively. P4Info is extended in-sync to generate fields IDs for these (carried as part of P4Info.controller_packet_metadata). * Add ControllerPacketMetadata Controller Packet-IO metadata, derived from P4 headers that are annotated as @controller_header("packet_out") or @controller_header("packet_in"). * Added comments Comments for PacketMetadata and PaketMetadata.metadata_id * Clarify comments Clarify comments on ControllerPacketMetadata and Metadata.name.

Commit:b3bb912
Author:Antonin Bas
Committer:GitHub

Fix Range MatchField in p4runtime.proto (#154) We were using integers for the bounds, when it should be byte strings.

Commit:3384b0b
Author:Antonin Bas
Committer:GitHub

Update p4runtime comment (#144) * Remove comment stating that aprof sharing is not supported in bmv2 * Update comment in p4info for ActionProfile size * Add comment for ActionProfileGroup max_size field in p4runtime The max_size is chosen when the group is created and cannot be modified thereafter.

Commit:7986a77
Author:wmohsin
Committer:Antonin Bas

Update p4runtime.proto (#143) Updated comments for TableEntry.priority and TableEntry.controller_metadata fields.

Commit:826fc8e
Author:Antonin Bas
Committer:GitHub

Fix p4runtime proto field numbering for MeterConfig (#140)

Commit:1ef313e
Author:Antonin Bas
Committer:GitHub

Stope generating action_ids for p4info tables (#138)

Commit:9854a96
Author:Antonin Bas
Committer:Antonin Bas

Remove old RPCs from p4runtime.proto Updated DeviceMgr and test code accordingly.

Commit:fee1838
Author:Antonin Bas
Committer:Antonin Bas

Remove deprecated device.proto

Commit:e380bf3
Author:Antonin Bas
Committer:Antonin Bas

Leave action_ids in Table proto during transition Leaving the action_ids repeated field in the Table message in p4info.proto while all implementations transition to the new ActionRef syntax.

Commit:8354d66
Author:Antonin Bas
Committer:Antonin Bas

Add ActionRef message in p4info.proto Instead of having a repeated field of action ids in the Table message, we introduce a new message type, ActionRef, which encapsulates the action id with a list of annotations; this way each action reference can have its own annotations.

Commit:6f4fedc
Author:wmohsin
Committer:Antonin Bas

Update p4runtime and p4info for counters & meters Refactor direct/indirect counters/meters into separate entities. Remove CounterCell message and the deprecated Counter{Read|Write} RPCs and corresponding messages.

Commit:57d1b13
Author:Antonin Bas
Committer:GitHub

Proposal to support extern types in p4runtime (#128) Proposed changes to p4info.proto and p4runtime.proto. We leverage google.protobuf.Any to pack / unpack extern-specific data in both cases. Guidelines to choose packages / appropriate URLs for extern-specific protobuf messages are TBD.

Commit:f5aedae
Author:Antonin Bas
Committer:Antonin Bas

Add new RPC support to gRPC server. Read, Write, SetForwardingPipelineConfig and GetForwardingPipelineConfig

Commit:b0e5d3e
Author:Antonin Bas
Committer:GitHub

Remove HeaderField and HeaderFieldList from p4info (#121)

Commit:4d62350
Author:wmohsin
Committer:Antonin Bas

Update p4runtime.proto (#112) * Update p4runtime.proto 1. Batching of write/read RPCs for various P4 entities 2. New RPC/semantics for P4 config * Update p4runtime.proto Fixed field-numbering, etc. bugs. * Update p4runtime.proto Left in old Counter RPCs to allow existing code to compile.

Commit:e231f30
Author:Antonin Bas
Committer:GitHub

Don't use Preamble for match fields and params (#115) In p4info.proto. We reserve preamble for top-level P4 objects. The plan is also to make match fields' and action parameters' ids local to the table / action they belong to.

Commit:bd72ee1
Author:Antonin Bas
Committer:Antonin Bas

Add a comment warning of HeaderField removal

Commit:e4f7253
Author:Antonin Bas
Committer:Antonin Bas

Rename path to name now that name became alias

Commit:a43dfa2
Author:Antonin Bas
Committer:Antonin Bas

Rename name to alias in p4info as per review

Commit:eef5f82
Author:Antonin Bas
Committer:Antonin Bas

Clarify comment for size in Table & ActionProfile

Commit:5d42404
Author:Antonin Bas
Committer:Antonin Bas

Add comment to explain we are updating p4info

Commit:16cdf20
Author:Antonin Bas
Committer:Antonin Bas

Switch all ids in p4info.proto to uint32 To be consistent with p4runtime.proto

Commit:d642d3f
Author:Antonin Bas
Committer:Antonin Bas

Add const_default_action_has_mutable_params For tables with a constant default action whose action parameters can be updated by the control plane.

Commit:a354b37
Author:Antonin Bas
Committer:Antonin Bas

Add with_entry_timeout to Table message in p4info To indicate that entry ageing has been enabled for that table in the P4 program.

Commit:844ba8a
Author:Antonin Bas
Committer:Antonin Bas

Introduce path in Preamble message in p4info

Commit:d8c4ee0
Author:Antonin Bas
Committer:Antonin Bas

Use Preamble in Param message definition To be consistent with MatchField.

Commit:fdec252
Author:Antonin Bas
Committer:Antonin Bas

Generalize MatchField definition in p4info In P4_16 a MatchField does not have to be a header field, it can be any expression.

Commit:9d88a83
Author:wmohsin
Committer:Antonin Bas

Update p4runtime.proto Move "weight" and "watch" from being part of ActionProfileMember definition to ActionProfileGroup attributes for using that member. A weight makes sense in the context of adding a member to a group, not when creating a member.

Commit:26844d5
Author:wmohsin
Committer:Antonin Bas

Update p4runtime.proto (#106) Change field number of TableUpdate.table_entry from 3 to 2 (there was no field 2).

Commit:67903c5
Author:wmohsin
Committer:Antonin Bas

Update p4runtime.proto (#101) Update p4runtime.proto Add RPCs for configuration of a P4 target.

Commit:5dedaae
Author:wmohsin
Committer:Antonin Bas

Update p4runtime.proto (#95) Use consistent integer-types for various fields. GUIDANCE https://google.github.io/styleguide/cppguide.html#Integer_Types You should not use the unsigned integer types such as uint32, unless there is a valid reason such as representing a bit pattern rather than a number, or you need defined overflow modulo 2^N. In particular, do not use unsigned types to say a number will never be negative. Since table/field/action/etc. IDs can encode parent/hierarchy info in various bits, I consider them bit patterns, and therefore use uint32. Other fields such as ‘weight’ and ‘max_size’ are changed to int32.

Commit:1dcd443
Author:Antonin Bas
Committer:GitHub

Rename PI gRPC service to P4Runtime (#93) We only renamed the service and updated the demo code accordingly. The proto file was also renamed from pi.proto to p4runtime.proto. For now, the rest of the code still refers to PI. We may also want to rename the repository from PI to p4Runtime / p4-runtime in the future, but for now it seems that the gRPC service was the priority.

Commit:bb9c881
Author:Yavuz Yetim
Committer:Antonin Bas

Renames PacketOut rpc and adds MasterArbitrationResponse.

Commit:a33d77d
Author:yyetim
Committer:Antonin Bas

Adds comments to pi.proto rpc functions. (#91) Fix pi.proto streaming interface

Commit:acd9c0b
Author:Antonin Bas
Committer:GitHub

Switch to new Counter RPC (#66) Updated proto frontend and demo to use the new Counter RPC instead of the temporary one we had previously.

Commit:5cd4792
Author:Antonin Bas
Committer:GitHub

Move field in pi.proto (#63) * Move field in pi.proto Moving the action_profile_id field to ActionProfileEntry as it is shared by both members and groups. * Fix affected parts of the code after pi.proto update

Commit:d3d9112
Author:wmohsin
Committer:Antonin Bas

Update pi.proto (#64)

Commit:e368aed
Author:Antonin Bas
Committer:GitHub

Using p4::config::P4Info instead of native PI json (#61) We are now using it in DeviceMgr (PI proto frontend) as well as for the experimental protobuf messages which push a new P4 configuration to the switch (device.proto).

Commit:9bf5c6f
Author:Antonin Bas
Committer:Antonin Bas

Move p4info.proto with other proto files

Commit:c3ca511
Author:Antonin Bas
Committer:GitHub

Fix .proto files organization (#56) Moved them to appropriate location based on the package. For temporary packages, not using p4.tmp instead of p4tmp. Installing proto/grpc generated headers to appropriate location.

Commit:fa47904
Author:Antonin Bas
Committer:GitHub

Initial proposal for p4info.proto (#45) * Initial proposal for p4info.proto p4info.proto is a Protobuf representation of the p4info DB * Update p4info.proto proposal based on feedback Some minor naming changes and additional comments. * Incorporate review feedback for p4info.proto Mostly added comments. Also changed the package to p4.config. * Add size to Table & ActionProfile in p4info.proto

Commit:a4718af
Author:Antonin Bas
Committer:Antonin Bas

Updated demo_grpc to new pi.proto The demo is now part of the repo's automake build. I am not sure it is a good solution for the long term, but in the mean-time it is convenient (i.e. before we clean-up which libraries are installed, under which name). Still things to cleanup in the demo, but can be done later.

Commit:01835ee
Author:Antonin Bas
Committer:GitHub

Implement proto frontend partially (#41) I implemented table_write partially (insert and delete); but no action profile support. The current pi.proto is not enough to reproduce the simple_router demo, so I had to add temporary protos, device.proto (to push P4 configuration to the device) and resource.proto (to read counter values). These are just temporary until a more permanent solution is agreed upon.

Commit:a6ff942
Author:wmohsin
Committer:Antonin Bas

First cut of proto definitions for P4 PI service. (#32) * First cut of proto definitions for P4 PI service. * Removed stale comment. * Updated comments. Clarified semantics for "errors" fields in TableWriteResponse and ActionProfileWriteResponse. * Added comments for prefix_len * Moved MasterArbitrationUpdate message to the end

Commit:74cf8a0
Author:Antonin Bas

renamed demo_pb to demo_grpc

Commit:da5af41
Author:Antonin Bas
Committer:Antonin Bas

comitting the demo version which uses protobuf, cleanup pending