forked from opencomputeproject/SAI
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update saitam.h (opencomputeproject#874)
* Update saitam.h * TAM 2.0 * TAM 2.0 * TAM 2.0 Spec * Review Comments * Review Comments Incorporated * Added Legacy Device Example * Review Comments Incorporated * Review Comments Incorporated * Review Comments Incorporated * Review Comments Incorporated * IOAM and IFA INT APIs * TAM INT API Set * Removed TAM INT API from this PR.
- Loading branch information
Showing
15 changed files
with
1,659 additions
and
976 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
/* | ||
* Copyright (c) 2017 Broadcom. The term "Broadcom" refers | ||
* to Broadcom Limited and/or its subsidiaries. | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
syntax = "proto2"; | ||
|
||
message Event { | ||
required uint64 timestamp = 1; | ||
|
||
oneof EventType { | ||
Drop drop_event = 2; | ||
FlowLearning flow_event = 3; | ||
} | ||
} | ||
|
||
|
||
message FlowLearning { | ||
enum FL_STATE { | ||
FL_INVALID = 0; | ||
FL_LEARN = 1; | ||
FL_AGING = 2; | ||
FL_EXPORT = 3; | ||
FL_TABLE_FULL = 4; /* Atomic event, no other information need to be send */ | ||
} | ||
|
||
optional FL_STATE fl_state = 1; | ||
} | ||
|
||
message Drop { | ||
optional uint32 dummy = 1; | ||
} | ||
|
||
message Flow { | ||
optional uint32 proto = 1; | ||
optional uint32 sip = 2; | ||
optional uint32 dip = 3; | ||
|
||
optional uint32 l4_sport = 4; | ||
optional uint32 l4_dport = 5; | ||
optional uint32 vnid = 6; | ||
optional uint32 inner_proto = 7; | ||
optional uint32 inner_sip = 8; | ||
optional uint32 inner_dip = 9; | ||
|
||
optional uint32 inner_l4_sport = 10; | ||
optional uint32 inner_l4_dport = 11; | ||
optional bytes custom_key = 12; | ||
optional uint32 group_id = 13; | ||
optional bytes packet = 14; | ||
} | ||
|
||
message EventPair { | ||
repeated Event event = 1; | ||
repeated Flow flow = 2; | ||
} | ||
|
||
message GenEvent { | ||
required string system_id = 1; | ||
optional uint32 component_id = 2; | ||
optional uint32 sub_component_id= 3; | ||
repeated EventPair eventpair = 4; | ||
optional string hostname = 5; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/* | ||
* Copyright (c) 2017 Broadcom. The term "Broadcom" refers | ||
* to Broadcom Limited and/or its subsidiaries. | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
syntax = "proto2"; | ||
import "google/protobuf/descriptor.proto"; | ||
|
||
extend google.protobuf.FieldOptions { | ||
optional TelemetryFieldOptions telemetry_options = 1024; | ||
} | ||
|
||
message TelemetryFieldOptions { | ||
optional bool is_key = 1; | ||
optional bool is_timestamp = 2; | ||
optional bool is_counter = 3; | ||
optional bool is_gauge = 4; | ||
} | ||
|
||
|
||
message TelemetryStream { | ||
required string system_id = 1 [(telemetry_options).is_key = true]; | ||
optional uint32 component_id = 2 [(telemetry_options).is_key = true]; | ||
optional uint32 sub_component_id = 3 [(telemetry_options).is_key = true]; | ||
optional string sensor_name = 4 [(telemetry_options).is_key = true]; | ||
optional uint32 sequence_number = 5; | ||
// timestamp (milliseconds since 00:00:00 UTC 1/1/1970) | ||
optional uint64 timestamp = 6 [(telemetry_options).is_timestamp = true]; | ||
optional uint32 version_major = 7; | ||
optional uint32 version_minor = 8; | ||
|
||
optional IETFSensors ietf = 100; | ||
optional EnterpriseSensors enterprise = 101; | ||
} | ||
|
||
message IETFSensors { | ||
extensions 1 to max; | ||
} | ||
|
||
message EnterpriseSensors { | ||
extensions 1 to max; | ||
} | ||
|
||
extend EnterpriseSensors { | ||
// re-use IANA assigned numbers | ||
optional SAISwitchSensors sai = 2636; | ||
} | ||
|
||
message SAISwitchSensors { | ||
extensions 1 to max; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,169 @@ | ||
/* | ||
* Copyright (c) 2017 Broadcom. The term "Broadcom" refers | ||
* to Broadcom Limited and/or its subsidiaries. | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
syntax = "proto2"; | ||
import "sai_tam_main.proto"; | ||
|
||
extend SAISwitchSensors { | ||
optional GPort sai_interface_ext = 3; | ||
} | ||
|
||
message GPort { | ||
repeated InterfaceInfos interface_stats = 1; | ||
} | ||
|
||
message InterfaceInfos { | ||
required string if_name = 1 [(telemetry_options).is_key = true]; | ||
optional uint64 init_time = 2; // time when if/stats last reset | ||
|
||
// Internal Port ID | ||
optional uint32 if_pid = 3; | ||
|
||
// SNMP Index | ||
optional uint32 snmp_if_index = 4; | ||
|
||
// name of parent for lag interface, if applicable | ||
optional string parent_lag_name = 5; | ||
|
||
// ingress traffic stats | ||
optional InterfaceStats ingress_stats = 6; | ||
|
||
// egress traffic stats | ||
optional InterfaceStats egress_stats = 7; | ||
|
||
// ingress traffic errors | ||
optional InterfaceErrors ingress_errors = 8; | ||
|
||
// egress traffic errors | ||
optional InterfaceErrors egress_errors = 9; | ||
|
||
// Interface administration status | ||
optional string if_admin_status = 10; | ||
|
||
// Interface operational status | ||
optional string if_op_status = 11; | ||
|
||
// number of carrier transitions on this interface | ||
optional uint64 if_transitions = 12 [(telemetry_options).is_counter = true]; | ||
|
||
// This corresponds to the ifLastChange object in the standard interface MIB | ||
optional uint32 ifLastChange = 13; | ||
|
||
// This corresponds to the ifHighSpeed object in the standard interface MIB | ||
optional uint32 ifHighSpeed = 14; | ||
|
||
repeated QueueStats egress_queue_info = 15; // egress queue information | ||
repeated QueueStats ingress_queue_info = 16; // ingress queue information | ||
} | ||
|
||
message InterfaceStats { | ||
// Counter: the total number of packets sent/rcvd by this interface | ||
optional uint64 if_pkts = 1 [(telemetry_options).is_counter = true]; | ||
|
||
// Counter: the total number of bytes sent/rcvd by this interface | ||
optional uint64 if_octets = 2 [(telemetry_options).is_counter = true]; | ||
|
||
// Rate: the rate at which packets are sent/rcvd by this interface (in packets/sec) | ||
optional uint64 if_1sec_pkts = 3 [(telemetry_options).is_gauge = true]; | ||
|
||
// Rate: the rate at which bytes are sent/rcvd by this interface | ||
optional uint64 if_1sec_octets = 4 [(telemetry_options).is_gauge = true]; | ||
|
||
// Counter: total no of unicast packets sent/rcvd by this interface | ||
optional uint64 if_uc_pkts = 5 [(telemetry_options).is_counter = true]; | ||
|
||
// Counter: total no of multicast packets sent/rcvd by this interface | ||
optional uint64 if_mc_pkts = 6 [(telemetry_options).is_counter = true]; | ||
|
||
// Counter: total no of broadcast packets sent/rcvd by this interface | ||
optional uint64 if_bc_pkts = 7 [(telemetry_options).is_counter = true]; | ||
|
||
// Counter: total no of error packets sent/rcvd by this interface | ||
optional uint64 if_error = 8 [(telemetry_options).is_counter = true]; | ||
|
||
// Counter: total no of PAUSE packets sent/rcvd by this interface | ||
optional uint64 if_pause_pkts = 9 [(telemetry_options).is_counter = true]; | ||
} | ||
|
||
message InterfaceErrors { | ||
// Counter: the number of packets that contained errors | ||
optional uint64 if_in_errors = 1 [(telemetry_options).is_counter = true]; | ||
|
||
// Counter: the number of packets dropped by the input queue | ||
optional uint64 if_in_qdrops = 2 [(telemetry_options).is_counter = true]; | ||
|
||
// Counter: the number of packets which were misaligned | ||
optional uint64 if_in_frame_errors = 3 [(telemetry_options).is_counter = true]; | ||
|
||
// Counter: the number of non-errorpackets which were chosen to be discarded | ||
optional uint64 if_in_discards = 4 [(telemetry_options).is_counter = true]; | ||
|
||
// Counter: the number of runt packets | ||
optional uint64 if_in_runts = 5 [(telemetry_options).is_counter = true]; | ||
|
||
// Counter: the number of packets that fail Layer 3 sanity checks of the header | ||
optional uint64 if_in_l3_incompletes = 6 [(telemetry_options).is_counter = true]; | ||
|
||
// Counter: the number of packets for which the software could not find a valid logical interface | ||
optional uint64 if_in_l2chan_errors = 7 [(telemetry_options).is_counter = true]; | ||
|
||
// Counter: the number of malform or short packets | ||
optional uint64 if_in_l2_mismatch_timeouts = 8 [(telemetry_options).is_counter = true]; | ||
|
||
// Counter: the number of FIFO errors | ||
optional uint64 if_in_fifo_errors = 9 [(telemetry_options).is_counter = true]; | ||
|
||
// Counter: the number of resourceerrors | ||
optional uint64 if_in_resource_errors = 10 [(telemetry_options).is_counter = true]; | ||
} | ||
|
||
message QueueStats { | ||
optional uint32 queue_number = 1 [(telemetry_options).is_key = true]; | ||
|
||
// Counter: the total number of packets that have been added to this queue | ||
optional uint64 packets = 2 [(telemetry_options).is_counter = true]; | ||
|
||
// Counter: the total number of bytes that have been added to this queue | ||
optional uint64 bytes = 3 [(telemetry_options).is_counter = true]; | ||
|
||
// Counter: the total number of tail dropped packets | ||
optional uint64 tail_drop_packets = 4 [(telemetry_options).is_counter = true]; | ||
|
||
// Counter: the total number of rate-limitd packets | ||
optional uint64 rl_drop_packets = 5 [(telemetry_options).is_counter = true]; | ||
|
||
// Counter: the total number of rate-limited bytes | ||
optional uint64 rl_drop_bytes = 6 [(telemetry_options).is_counter = true]; | ||
|
||
// Counter: the total number of red-dropped packets | ||
optional uint64 red_drop_packets = 7 [(telemetry_options).is_counter = true]; | ||
|
||
// Counter: the total number of red-dropped bytes | ||
optional uint64 red_drop_bytes = 8 [(telemetry_options).is_counter = true]; | ||
|
||
// Average: avg queue depth,TAQL:time-average-queue-len, in packets, details TBD | ||
optional uint64 avg_buffer_occupancy = 9 [(telemetry_options).is_gauge = true]; | ||
|
||
// Gauge: current queue depth, in packets | ||
optional uint64 cur_buffer_occupancy = 10 [(telemetry_options).is_gauge = true]; | ||
|
||
// Peak: the max measured queue depth, in packets, across all measurements since bo ot. | ||
optional uint64 peak_buffer_occupancy = 11 [(telemetry_options).is_gauge = true]; | ||
|
||
// allocated buffer size | ||
optional uint64 allocated_buffer_size = 12 [(telemetry_options).is_gauge = true]; | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.