Skip to content
Open
Changes from all 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
32 changes: 32 additions & 0 deletions proto/p4/v1/p4runtime.proto
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ service P4Runtime {

rpc Capabilities(CapabilitiesRequest) returns (CapabilitiesResponse) {
}

// Get properties of a resource
rpc GetResourceProperties(GetResourcePropertiesRequest)
returns (GetResourcePropertiesResponse) {
}
}

//------------------------------------------------------------------------------
Expand Down Expand Up @@ -791,3 +796,30 @@ message CapabilitiesResponse {
// version of the P4Runtime API currently implemented by the server.
string p4runtime_api_version = 1;
}

//------------------------------------------------------------------------------
message GetResourcePropertiesRequest {
enum PropertyType {
// Default behavior. Returns all the properties of the resource.
ALL = 0;
// Returns number of entries in the resource
NUM_OF_ENTRIES = 1;
// Returns total capacity of the resource
SIZE = 2;
}

// Unique identifier of a resource
// 0 is wildcard which fetches properties of all the resources
uint32 id = 1;
PropertyType property_type = 2;
}

message GetResourcePropertiesResponse {
repeated ResourceProperties = 1;
}

message ResourceProperties {
uint32 id = 1;
uint32 num_of_entries = 2;
uint32 size = 3;
}