sum_msg.h (1797B)
1 /* 2 * 3 * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 4 * 5 * Copyright 2007-2019 Broadcom Inc. All rights reserved. 6 * 7 * File: shr_sum_msg.h 8 */ 9 10 #ifndef SHR_SUM_MSG_H_ 11 #define SHR_SUM_MSG_H_ 12 13 #include <soc/shared/sum.h> 14 #include <soc/shared/shr_pkt.h> 15 #include <shared/pack.h> 16 17 #ifdef BCM_UKERNEL 18 #define __COMPILER_ATTR__ __attribute__ ((packed, aligned(4))) 19 #else 20 #define __COMPILER_ATTR__ 21 #endif 22 23 /* 24 * SUM config information 25 */ 26 typedef struct __COMPILER_ATTR__ shr_sum_msg_ctrl_config_s { 27 /* Host buffer address to update stats information */ 28 uint32 host_buf_addr; 29 30 /* sampling interval */ 31 uint32 usec_sample_interval; 32 33 /* Maximum samples */ 34 uint32 max_history; 35 36 /* Type of counter to be monitor packet/byte/both */ 37 uint32 sum_type; 38 39 /* Number of ports being monitored */ 40 uint32 num_ports; 41 42 /* List of physical ports */ 43 uint32 pports[SHR_SUM_MAX_PORTS]; 44 45 /* List of logical ports */ 46 uint32 lports[SHR_SUM_MAX_PORTS]; 47 48 /* MIB Table Base Address */ 49 uint32 mib_tbl_addr; 50 51 /* MIB Table Acc Type */ 52 uint8 mib_tbl_acc_type; 53 54 /* SUM WARM BOOT INDICATOR */ 55 uint8 sum_wb_indicate; 56 } shr_sum_msg_ctrl_config_t; 57 58 /* SUM usage information */ 59 typedef struct __COMPILER_ATTR__ shr_sum_msg_buf_info_s { 60 /* Host buffer current offset */ 61 uint32 host_buf_cur_offset; 62 63 /* Host buffer status */ 64 uint32 host_buf_status; 65 66 /* sampling interval */ 67 uint32 sample_interval; 68 69 } shr_sum_msg_buf_info_t; 70 /* 71 * SUM control messages 72 */ 73 typedef union shr_sum_msg_ctrl_s { 74 shr_sum_msg_ctrl_config_t config_info; 75 shr_sum_msg_buf_info_t buf_info; 76 } shr_sum_msg_ctrl_t; 77 #endif /* SHR_SUM_MSG_H_ */