lanz.proto 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. syntax = "proto2";
  9. option go_package = "proto";
  10. package LanzProtobuf;
  11. message ConfigRecord {
  12. required uint64 timestamp = 1; // Time of change in configuration in micro-seconds (UTC)
  13. required uint32 lanzVersion = 2; // LANZ feature version
  14. required uint32 numOfPorts = 3; // Num of ports in the switch
  15. required uint32 segmentSize = 4; // Segement size
  16. required uint32 maxQueueSize = 5; // Maximum queue size in segments
  17. message PortConfigRecord {
  18. required string intfName = 1; // Name of the port
  19. required uint32 switchId = 2; // Id of the chip on a multi-chip system
  20. required uint32 portId = 3; // Id of the port
  21. required bool internalPort = 4; // 'True' if it's an internal port
  22. required uint32 highThreshold = 5; // Higher threshold
  23. required uint32 lowThreshold = 6; // Lower threshold
  24. }
  25. repeated PortConfigRecord portConfigRecord = 6; // Lanz config details of each port
  26. optional uint32 globalUsageHighThreshold = 7; // High threshold for global usage monitoring
  27. optional uint32 globalUsageLowThreshold = 8; // Low threshold for global usage monitoring
  28. optional bool globalUsageReportingEnabled = 9; // Global buffer reporting enabled
  29. }
  30. message GlobalBufferUsageRecord {
  31. enum EntryType {
  32. LOW = 1;
  33. UPDATE = 2;
  34. HIGH = 3;
  35. }
  36. optional EntryType entryType = 1;
  37. optional uint64 timestamp = 2; // Time of entry in micro-seconds (UTC)
  38. optional uint32 bufferSize = 3; // Size of global buffer
  39. optional uint32 duration = 4; // duration of buffer usage between high and low
  40. }
  41. message CongestionRecord {
  42. required uint64 timestamp = 1; // Time of congestion in micro-seconds (UTC)
  43. required string intfName = 2; // Name of the port
  44. required uint32 switchId = 3; // Id of the chip on a multi-chip system
  45. required uint32 portId = 4; // Id of the port
  46. required uint32 queueSize = 5; // Queue size in segments at time of congestion
  47. enum EntryType {
  48. START = 1;
  49. UPDATE = 2;
  50. END = 3;
  51. }
  52. optional EntryType entryType = 6; // Type of entry
  53. optional uint32 trafficClass = 7; // Traffic Class
  54. optional uint64 timeOfMaxQLen = 8; // Time of max q len since congestion start
  55. optional uint32 txLatency = 9; // Transmit latency
  56. optional uint32 qDropCount = 10; // Queue drop count
  57. optional string fabricPeerIntfName = 11; // Name of the fabric port's peer
  58. }
  59. message ErrorRecord {
  60. required uint64 timestamp = 1; // Time of event in micro-seconds (UTC)
  61. required string errorMessage = 2; // Text message
  62. }
  63. message LanzRecord {
  64. optional ConfigRecord configRecord = 1;
  65. optional CongestionRecord congestionRecord = 2;
  66. optional ErrorRecord errorRecord = 3;
  67. optional GlobalBufferUsageRecord globalBufferUsageRecord = 4;
  68. }