summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMandy Lavi <mandy.lavi@freescale.com>2015-03-15 14:42:46 (GMT)
committerOlivia Yin-R63875 <r63875@freescale.com>2015-03-26 06:24:38 (GMT)
commitfcf68b8a306c286ec76e8351eea91c81c1ca608f (patch)
treeee088e728e8e226c386525c5ddb52dec89830cda /include
parent6cfad45636d0b16553a81b54c9501b0d9d48949f (diff)
downloadlinux-fsl-qoriq-fcf68b8a306c286ec76e8351eea91c81c1ca608f.tar.xz
fmd: Add support for reading BMI counters from US
Technical Details : Add support for the following BMI counters and make them available to the DPA stats interface in the User Space: e_FM_PORT_COUNTERS_DISCARD_FRAME, /* BMI stat counter */ e_FM_PORT_COUNTERS_RX_BAD_FRAME, /* BMI Rx stat counter */ e_FM_PORT_COUNTERS_RX_LARGE_FRAME, /* BMI Rx stat counter */ e_FM_PORT_COUNTERS_RX_LIST_DMA_ERR, /* BMI Rx OP stat counter */ e_FM_PORT_COUNTERS_RX_OUT_OF_BUFFERS_DISCARD, /* BMI Rx OP stat counter */ e_FM_PORT_COUNTERS_WRED_DISCARD, /* BMI OP stat counter */ @Function FM_PORT_GetBmiCounters @Description Read port's BMI stat counters and place them into a designated structure of counters. @Param[in] h_FmPort A handle to a FM Port module. @Param[out] p_BmiStats counters structure Change-Id: I464b5defc29e149252002c911b22e69343e61adf Signed-off-by: Mandy Lavi <mandy.lavi@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/32755 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Igal Liberman <Igal.Liberman@freescale.com> Reviewed-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
Diffstat (limited to 'include')
-rw-r--r--include/uapi/linux/fmd/Peripherals/fm_port_ioctls.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/include/uapi/linux/fmd/Peripherals/fm_port_ioctls.h b/include/uapi/linux/fmd/Peripherals/fm_port_ioctls.h
index 49d1f50..0d5965e 100644
--- a/include/uapi/linux/fmd/Peripherals/fm_port_ioctls.h
+++ b/include/uapi/linux/fmd/Peripherals/fm_port_ioctls.h
@@ -186,6 +186,26 @@ typedef enum ioc_fm_port_counters {
e_IOC_FM_PORT_COUNTERS_DEQ_CONFIRM /**< QMI counter */
} ioc_fm_port_counters;
+typedef struct ioc_fm_port_bmi_stats_t {
+ uint32_t cnt_cycle;
+ uint32_t cnt_task_util;
+ uint32_t cnt_queue_util;
+ uint32_t cnt_dma_util;
+ uint32_t cnt_fifo_util;
+ uint32_t cnt_rx_pause_activation;
+ uint32_t cnt_frame;
+ uint32_t cnt_discard_frame;
+ uint32_t cnt_dealloc_buf;
+ uint32_t cnt_rx_bad_frame;
+ uint32_t cnt_rx_large_frame;
+ uint32_t cnt_rx_filter_frame;
+ uint32_t cnt_rx_list_dma_err;
+ uint32_t cnt_rx_out_of_buffers_discard;
+ uint32_t cnt_wred_discard;
+ uint32_t cnt_length_err;
+ uint32_t cnt_unsupported_format;
+} ioc_fm_port_bmi_stats_t;
+
/**************************************************************************//**
@Description Structure for Port id parameters.
(Description may be inaccurate;
@@ -915,6 +935,23 @@ typedef struct ioc_fm_port_vsp_alloc_params_t {
#define FM_PORT_IOC_VSP_ALLOC _IOW(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(38), ioc_fm_port_vsp_alloc_params_t)
#endif /* (DPAA_VERSION >= 11) */
+/**************************************************************************//**
+ @Function FM_PORT_GetBmiCounters
+
+ @Description Read port's BMI stat counters and place them into
+ a designated structure of counters.
+
+ @Param[in] h_FmPort A handle to a FM Port module.
+ @Param[out] p_BmiStats counters structure
+
+ @Return E_OK on success; Error code otherwise.
+
+ @Cautions Allowed only following FM_PORT_Init().
+*//***************************************************************************/
+
+#define FM_PORT_IOC_GET_BMI_COUNTERS _IOR(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(42), ioc_fm_port_bmi_stats_t)
+
+
/** @} */ /* end of lnx_ioctl_FM_PORT_pcd_runtime_control_grp group */
/** @} */ /* end of lnx_ioctl_FM_PORT_runtime_control_grp group */