github.com/aristanetworks/goarista@v0.0.0-20240514173732-cca2755bbd44/lanz/proto/lanz.proto (about) 1 // Copyright (c) 2011 Arista Networks, Inc. All rights reserved. 2 // Use of this source code is governed by the Apache License 2.0 3 // that can be found in the COPYING file. 4 // 5 // This Google Protocol Buffer schema contains the message 6 // that are used for Lanz streaming. 7 // 8 9 syntax = "proto2"; 10 11 option go_package = "proto"; 12 13 package LanzProtobuf; 14 15 message ConfigRecord { 16 required uint64 timestamp = 1; // Time of change in configuration in micro-seconds (UTC) 17 required uint32 lanzVersion = 2; // LANZ feature version 18 required uint32 numOfPorts = 3; // Num of ports in the switch 19 required uint32 segmentSize = 4; // Segement size 20 required uint32 maxQueueSize = 5; // Maximum queue size in segments 21 optional uint32 qLenInterval = 10; // Frequency of update 22 message PortConfigRecord { 23 required string intfName = 1; // Name of the port 24 required uint32 switchId = 2; // Id of the chip on a multi-chip system 25 required uint32 portId = 3; // Id of the port 26 required bool internalPort = 4; // 'True' if it's an internal port 27 required uint32 highThreshold = 5; // Higher threshold 28 required uint32 lowThreshold = 6; // Lower threshold 29 } 30 repeated PortConfigRecord portConfigRecord = 6; // Lanz config details of each port 31 optional uint32 globalUsageHighThreshold = 7; // High threshold for global usage monitoring 32 optional uint32 globalUsageLowThreshold = 8; // Low threshold for global usage monitoring 33 optional bool globalUsageReportingEnabled = 9; // Global buffer reporting enabled 34 } 35 36 message GlobalBufferUsageRecord { 37 enum EntryType { 38 LOW = 1; 39 UPDATE = 2; 40 HIGH = 3; 41 } 42 optional EntryType entryType = 1; 43 optional uint64 timestamp = 2; // Time of entry in micro-seconds (UTC) 44 optional uint32 bufferSize = 3; // Size of global buffer 45 optional uint32 duration = 4; // duration of buffer usage between high and low 46 } 47 48 message CongestionRecord { 49 required uint64 timestamp = 1; // Time of congestion in micro-seconds (UTC) 50 required string intfName = 2; // Name of the port 51 required uint32 switchId = 3; // Id of the chip on a multi-chip system 52 required uint32 portId = 4; // Id of the port 53 required uint32 queueSize = 5; // Queue size in segments at time of congestion 54 enum EntryType { 55 START = 1; 56 UPDATE = 2; 57 END = 3; 58 POLLING = 4; 59 } 60 optional EntryType entryType = 6; // Type of entry 61 optional uint32 trafficClass = 7; // Traffic Class 62 optional uint64 timeOfMaxQLen = 8; // Time of max q len since congestion start 63 optional uint32 txLatency = 9; // Transmit latency 64 optional uint32 qDropCount = 10; // Queue drop count 65 optional string fabricPeerIntfName = 11; // Name of the fabric port's peer 66 } 67 68 message ErrorRecord { 69 required uint64 timestamp = 1; // Time of event in micro-seconds (UTC) 70 required string errorMessage = 2; // Text message 71 } 72 73 message LanzRecord { 74 optional ConfigRecord configRecord = 1; 75 optional CongestionRecord congestionRecord = 2; 76 optional ErrorRecord errorRecord = 3; 77 optional GlobalBufferUsageRecord globalBufferUsageRecord = 4; 78 }