1/* 2 * Copyright (c) 2012, The Linux Foundation. All rights reserved. 3 * Permission to use, copy, modify, and/or distribute this software for 4 * any purpose with or without fee is hereby granted, provided that the 5 * above copyright notice and this permission notice appear in all copies. 6 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 7 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 8 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 9 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 10 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 11 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT 12 * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 13 */ 14 15 16/** 17 * @defgroup fal_mib FAL_MIB 18 * @{ 19 */ 20#ifndef _FAL_MIB_H 21#define _FAL_MIB_H 22 23#ifdef __cplusplus 24extern "C" { 25#endif /* __cplusplus */ 26 27#include "common/sw.h" 28#include "fal/fal_type.h" 29 30 /**@brief This structure defines the mib infomation. 31 */ 32 typedef struct 33 { 34 a_uint32_t RxBroad; 35 a_uint32_t RxPause; 36 a_uint32_t RxMulti; 37 a_uint32_t RxFcsErr; 38 a_uint32_t RxAllignErr; 39 a_uint32_t RxRunt; 40 a_uint32_t RxFragment; 41 a_uint32_t Rx64Byte; 42 a_uint32_t Rx128Byte; 43 a_uint32_t Rx256Byte; 44 a_uint32_t Rx512Byte; 45 a_uint32_t Rx1024Byte; 46 a_uint32_t Rx1518Byte; 47 a_uint32_t RxMaxByte; 48 a_uint32_t RxTooLong; 49 a_uint32_t RxGoodByte_lo; /**< low 32 bits of RxGoodByte statistc item */ 50 a_uint32_t RxGoodByte_hi; /**< high 32 bits of RxGoodByte statistc item*/ 51 a_uint32_t RxBadByte_lo; /**< low 32 bits of RxBadByte statistc item */ 52 a_uint32_t RxBadByte_hi; /**< high 32 bits of RxBadByte statistc item */ 53 a_uint32_t RxOverFlow; 54 a_uint32_t Filtered; 55 a_uint32_t TxBroad; 56 a_uint32_t TxPause; 57 a_uint32_t TxMulti; 58 a_uint32_t TxUnderRun; 59 a_uint32_t Tx64Byte; 60 a_uint32_t Tx128Byte; 61 a_uint32_t Tx256Byte; 62 a_uint32_t Tx512Byte; 63 a_uint32_t Tx1024Byte; 64 a_uint32_t Tx1518Byte; 65 a_uint32_t TxMaxByte; 66 a_uint32_t TxOverSize; 67 a_uint32_t TxByte_lo; /**< low 32 bits of TxByte statistc item */ 68 a_uint32_t TxByte_hi; /**< high 32 bits of TxByte statistc item */ 69 a_uint32_t TxCollision; 70 a_uint32_t TxAbortCol; 71 a_uint32_t TxMultiCol; 72 a_uint32_t TxSingalCol; 73 a_uint32_t TxExcDefer; 74 a_uint32_t TxDefer; 75 a_uint32_t TxLateCol; 76 a_uint32_t RxUniCast; 77 a_uint32_t TxUniCast; 78 } fal_mib_info_t; 79 80 81 sw_error_t 82 fal_get_mib_info(a_uint32_t dev_id, fal_port_t port_id, 83 fal_mib_info_t * mib_info ); 84 85 sw_error_t 86 fal_get_rx_mib_info(a_uint32_t dev_id, fal_port_t port_id, 87 fal_mib_info_t * mib_info ); 88 89 sw_error_t 90 fal_get_tx_mib_info(a_uint32_t dev_id, fal_port_t port_id, 91 fal_mib_info_t * mib_info ); 92 93 94 sw_error_t 95 fal_mib_status_set(a_uint32_t dev_id, a_bool_t enable); 96 97 98 99 sw_error_t 100 fal_mib_status_get(a_uint32_t dev_id, a_bool_t * enable); 101 102 103 sw_error_t 104 fal_mib_port_flush_counters(a_uint32_t dev_id, fal_port_t port_id); 105 106 107 sw_error_t 108 fal_mib_cpukeep_set(a_uint32_t dev_id, a_bool_t enable); 109 110 sw_error_t 111 fal_mib_cpukeep_get(a_uint32_t dev_id, a_bool_t * enable); 112 113#ifdef __cplusplus 114} 115#endif /* __cplusplus */ 116 117#endif /* _FAL_MIB_H */ 118/** 119 * @} 120 */ 121