Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions docs/v1/P4Runtime-Spec.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6030,10 +6030,19 @@ error {
== `Capabilities` RPC

The `Capabilities` RPC offers a mechanism through which a P4Runtime client can
discover the capabilities of the P4Runtime server implementation. At the moment,
the `CapabilitiesRequest` message is empty and the `CapabilitiesResponse`
message includes the `p4runtime_api_version` string field and the `experimental`
field, which has type `Any` Protobuf message cite:[ProtoAny].
discover the capabilities of the P4Runtime server implementation.

The `CapabilitiesRequest` message contains a single optional field `device_id`.

`device_id` is an optional filter to limit the capabilities in the response to those
applicable to the target P4 device. A `NOT_FOUND` error is returned if the `device_id`
is not recognized by the P4Runtime server. If `device_id` is unset (or 0), the response
should only include capabilities that are server-wide (those which are applicable
across all devices). Note that if `device_id` is set to a valid id, both server-wide and
device-specific capabilities will be returned.

The `CapabilitiesResponse` message includes the `p4runtime_api_version` string field
and the `experimental` field, which has type `Any` Protobuf message cite:[ProtoAny].

The `p4runtime_api_version` field must be set to the full semantic version string cite:[SemVer]
corresponding to the version of the P4Runtime API implemented by the server, e.g. "1.1.0-rc.1".
Expand Down
120 changes: 67 additions & 53 deletions go/p4/v1/p4runtime.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion proto/p4/v1/p4runtime.proto
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,12 @@ enum SdnPort {
}

//------------------------------------------------------------------------------
message CapabilitiesRequest {}
message CapabilitiesRequest {
// Optional: Response should include the device-specific capabilities of the
// device identified by `device_id` in addition to server-wide capabilities.
// Added in v1.5.0
uint64 device_id = 1;
}

message CapabilitiesResponse {
// The full semantic version string (e.g. "1.1.0-rc.1") corresponding to the
Expand Down
Loading