int_msg.h (2564B)
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_int_msg.h 8 */ 9 10 #ifndef SHR_INT_MSG_H_ 11 #define SHR_INT_MSG_H_ 12 13 #include <soc/shared/int.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 typedef struct __COMPILER_ATTR__ shr_int_turnaround_msg_ctrl_init_s { 25 /* Local RX DMA channel */ 26 uint32 rx_channel; 27 28 /* Local TX DMA channel */ 29 uint32 tx_channel; 30 31 } shr_int_turnaround_msg_ctrl_init_t; 32 33 /* 34 * Create INT Turnaround config information 35 */ 36 typedef struct __COMPILER_ATTR__ shr_int_turnaround_msg_ctrl_config_s { 37 /* INT Turnaround Source mac */ 38 bcm_mac_t src_mac; 39 40 /* Length of the INT Turnaround LB header encapsulation */ 41 uint16 lb_encap_length; 42 43 /* LoopBack header encapsulation */ 44 uint8 lb_encap[SHR_LB_HEADER_LENGTH]; 45 } shr_int_turnaround_msg_ctrl_config_t; 46 47 /* 48 * Create INT Turnaround statistics information 49 */ 50 typedef struct __COMPILER_ATTR__ shr_int_turnaround_msg_ctrl_stat_s { 51 /* Number of packet received */ 52 uint32 rx_pkt_cnt_hi; 53 uint32 rx_pkt_cnt_lo; 54 55 /* Number of packet transmitted */ 56 uint32 tx_pkt_cnt_hi; 57 uint32 tx_pkt_cnt_lo; 58 59 /* Number of non INT pkt dropped */ 60 uint32 drop_pkt_cnt_hi; 61 uint32 drop_pkt_cnt_lo; 62 63 /* Number of pkt dropped due to missing configuration */ 64 uint32 int_init_config_drop_hi; 65 uint32 int_init_config_drop_lo; 66 67 /* Number of pkt dropped due to Hop count exceeded Hop limit */ 68 uint32 int_hop_cnt_invalid_drop_hi; 69 uint32 int_hop_cnt_invalid_drop_lo; 70 71 /* Number of pkt dropped due to current length exceeded maximum length */ 72 uint32 int_hdr_len_invalid_drop_hi; 73 uint32 int_hdr_len_invalid_drop_lo; 74 75 /* Number of pkt dropped due to invalid packet size */ 76 uint32 int_pkt_size_invalid_drop_hi; 77 uint32 int_pkt_size_invalid_drop_lo; 78 79 } shr_int_turnaround_msg_ctrl_stat_t; 80 81 /* 82 * INT Turnaround control messages 83 */ 84 typedef union shr_int_turnaround_msg_ctrl_s { 85 shr_int_turnaround_msg_ctrl_init_t int_init; 86 shr_int_turnaround_msg_ctrl_config_t int_turnaround_config_info; 87 shr_int_turnaround_msg_ctrl_stat_t int_turnaround_stat_info; 88 } shr_int_turnaround_msg_ctrl_t; 89 #endif /* SHR_INT_MSG_H_ */