summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarian Chereji <marian.chereji@freescale.com>2014-12-04 11:05:01 (GMT)
committerHonghua Yin <Hong-Hua.Yin@freescale.com>2015-03-17 07:01:03 (GMT)
commit71702d053d60b5d53931f7d8cd62e1a9e37c7939 (patch)
treece57401c8a40a29997421ba6ee11e271c2d84f9e /include
parent7a590b6c487881f36caf0369455c39b2b31ae5f6 (diff)
downloadlinux-fsl-qoriq-71702d053d60b5d53931f7d8cd62e1a9e37c7939.tar.xz
fmd: Render match table key statistics accessible from user space
The key statistics for match tables are not accessible from user space using fmlib. This update implements the support for the function FM_PCD_MatchTableGetKeyStatistics to be accessible from user space. Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Change-Id: Ibcf40fdcf7a60afc65b2f926c2a1474513ae8950 Reviewed-on: http://git.am.freescale.net:8181/25376 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Mandy Lavi <Mandy.Lavi@freescale.com> Reviewed-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
Diffstat (limited to 'include')
-rw-r--r--include/uapi/linux/fmd/Peripherals/fm_pcd_ioctls.h43
1 files changed, 36 insertions, 7 deletions
diff --git a/include/uapi/linux/fmd/Peripherals/fm_pcd_ioctls.h b/include/uapi/linux/fmd/Peripherals/fm_pcd_ioctls.h
index da52749..bc920fb 100644
--- a/include/uapi/linux/fmd/Peripherals/fm_pcd_ioctls.h
+++ b/include/uapi/linux/fmd/Peripherals/fm_pcd_ioctls.h
@@ -2339,11 +2339,40 @@ typedef struct ioc_fm_pcd_cc_key_statistics_t {
} ioc_fm_pcd_cc_key_statistics_t;
-typedef struct ioc_fm_pcd_cc_tbl_get_miss_params_t {
+typedef struct ioc_fm_pcd_cc_tbl_get_stats_t {
void *id;
- ioc_fm_pcd_cc_key_statistics_t miss_statistics;
-} ioc_fm_pcd_cc_tbl_get_miss_params_t;
+ uint16_t key_index;
+ ioc_fm_pcd_cc_key_statistics_t statistics;
+} ioc_fm_pcd_cc_tbl_get_stats_t;
+/**************************************************************************//**
+ @Function FM_PCD_MatchTableGetKeyStatistics
+
+ @Description This routine may be used to get statistics counters of specific key
+ in a CC Node.
+
+ If 'e_FM_PCD_CC_STATS_MODE_FRAME' and
+ 'e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME' were set for this node,
+ these counters reflect how many frames passed that were matched
+ this key; The total frames count will be returned in the counter
+ of the first range (as only one frame length range was defined).
+ If 'e_FM_PCD_CC_STATS_MODE_RMON' was set for this node, the total
+ frame count will be separated to frame length counters, based on
+ provided frame length ranges.
+
+ @Param[in] h_CcNode A handle to the node
+ @Param[in] keyIndex Key index for adding
+ @Param[out] p_KeyStatistics Key statistics counters
+
+ @Return The specific key statistics.
+
+ @Cautions Allowed only following FM_PCD_MatchTableSet().
+*//***************************************************************************/
+
+#if defined(CONFIG_COMPAT)
+#define FM_PCD_IOC_MATCH_TABLE_GET_KEY_STAT_COMPAT _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(12), ioc_compat_fm_pcd_cc_tbl_get_stats_t)
+#endif
+#define FM_PCD_IOC_MATCH_TABLE_GET_KEY_STAT _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(12), ioc_fm_pcd_cc_tbl_get_stats_t)
/**************************************************************************//**
@Function FM_PCD_MatchTableGetMissStatistics
@@ -2367,9 +2396,9 @@ typedef struct ioc_fm_pcd_cc_tbl_get_miss_params_t {
*//***************************************************************************/
#if defined(CONFIG_COMPAT)
-#define FM_PCD_IOC_MATCH_TABLE_GET_MISS_STAT_COMPAT _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(12), ioc_compat_fm_pcd_cc_tbl_get_miss_params_t)
+#define FM_PCD_IOC_MATCH_TABLE_GET_MISS_STAT_COMPAT _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(13), ioc_compat_fm_pcd_cc_tbl_get_stats_t)
#endif
-#define FM_PCD_IOC_MATCH_TABLE_GET_MISS_STAT _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(12), ioc_fm_pcd_cc_tbl_get_miss_params_t)
+#define FM_PCD_IOC_MATCH_TABLE_GET_MISS_STAT _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(13), ioc_fm_pcd_cc_tbl_get_stats_t)
/**************************************************************************//**
@Function FM_PCD_HashTableGetMissStatistics
@@ -2391,9 +2420,9 @@ typedef struct ioc_fm_pcd_cc_tbl_get_miss_params_t {
*//***************************************************************************/
#if defined(CONFIG_COMPAT)
-#define FM_PCD_IOC_HASH_TABLE_GET_MISS_STAT_COMPAT _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(13), ioc_compat_fm_pcd_cc_tbl_get_miss_params_t)
+#define FM_PCD_IOC_HASH_TABLE_GET_MISS_STAT_COMPAT _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(14), ioc_compat_fm_pcd_cc_tbl_get_stats_t)
#endif
-#define FM_PCD_IOC_HASH_TABLE_GET_MISS_STAT _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(13), ioc_fm_pcd_cc_tbl_get_miss_params_t)
+#define FM_PCD_IOC_HASH_TABLE_GET_MISS_STAT _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(14), ioc_fm_pcd_cc_tbl_get_stats_t)
/**************************************************************************//**