diff options
author | Aurelian Zanoschi <Aurelian.Zanoschi@freescale.com> | 2013-05-23 09:41:34 (GMT) |
---|---|---|
committer | Fleming Andrew-AFLEMING <AFLEMING@freescale.com> | 2013-05-24 20:37:15 (GMT) |
commit | da123e947e31ea3cf9b98a717616be61228133fa (patch) | |
tree | fea18801e18a9c18a6a5a56933c18f9c1754c444 /drivers/staging | |
parent | d623c831386eadb04bf7eb005edcacc7bcc0a50f (diff) | |
download | linux-fsl-qoriq-da123e947e31ea3cf9b98a717616be61228133fa.tar.xz |
dpa_offload: Fix for dpa_stats counter selection
The selection of a counter that has offset zero caused returning of
default counter value(zero) for all selections matching this patters.
The reassembly NCSP and all the Classif CC Node counters supported on
FMAN v3 are now marked with UNSUPPORTED_CNT_SEL and only for them the
default counter value is returned.
Change-Id: I52cdca2cb65765af88b8e43517d66c88626a7143
Signed-off-by: Aurelian Zanoschi <Aurelian.Zanoschi@freescale.com>
Reviewed-on: http://git.am.freescale.net:8181/2669
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Floarea Anca Jeanina-B12569 <anca.floarea@freescale.com>
Reviewed-by: Chereji Marian-Cornel-R27762 <marian.chereji@freescale.com>
Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/fsl_dpa_offload/dpa_stats.c | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/drivers/staging/fsl_dpa_offload/dpa_stats.c b/drivers/staging/fsl_dpa_offload/dpa_stats.c index 51f5fc5..0d8f65f 100644 --- a/drivers/staging/fsl_dpa_offload/dpa_stats.c +++ b/drivers/staging/fsl_dpa_offload/dpa_stats.c @@ -46,6 +46,7 @@ #include "fm_pcd_ext.h" #define STATS_VAL_SIZE 4 +#define UNSUPPORTED_CNT_SEL -1 #define CLASSIF_STATS_SHIFT 4 #define WORKQUEUE_MAX_ACTIVE 3 @@ -738,7 +739,7 @@ static void create_cnt_reass_stats(struct dpa_stats *dpa_stats) struct t_FmPcdManipReassemIpStats, nonConsistentSp); #else - dpa_stats->stats_sel[DPA_STATS_CNT_REASS][6] = 0; + dpa_stats->stats_sel[DPA_STATS_CNT_REASS][6] = UNSUPPORTED_CNT_SEL; #endif /* (DPAA_VERSION >= 11) */ /* DPA_STATS_CNT_REASS_IPv4_FRAMES */ dpa_stats->stats_sel[DPA_STATS_CNT_REASS][8] = offsetof( @@ -879,6 +880,37 @@ static void create_classif_stats(struct dpa_stats *dpa_stats) dpa_stats->stats_sel[DPA_STATS_CNT_CLASSIF_NODE][11] = offsetof( struct t_FmPcdCcKeyStatistics, frameLengthRangeCount[9]); +#else + /* DPA_STATS_CNT_CLASSIF_RANGE1 */ + dpa_stats->stats_sel[DPA_STATS_CNT_CLASSIF_NODE][2] = + UNSUPPORTED_CNT_SEL; + /* DPA_STATS_CNT_CLASSIF_RANGE2 */ + dpa_stats->stats_sel[DPA_STATS_CNT_CLASSIF_NODE][3] = + UNSUPPORTED_CNT_SEL; + /* DPA_STATS_CNT_CLASSIF_RANGE3 */ + dpa_stats->stats_sel[DPA_STATS_CNT_CLASSIF_NODE][4] = + UNSUPPORTED_CNT_SEL; + /* DPA_STATS_CNT_CLASSIF_RANGE4 */ + dpa_stats->stats_sel[DPA_STATS_CNT_CLASSIF_NODE][5] = + UNSUPPORTED_CNT_SEL; + /* DPA_STATS_CNT_CLASSIF_RANGE5 */ + dpa_stats->stats_sel[DPA_STATS_CNT_CLASSIF_NODE][6] = + UNSUPPORTED_CNT_SEL; + /* DPA_STATS_CNT_CLASSIF_RANGE6 */ + dpa_stats->stats_sel[DPA_STATS_CNT_CLASSIF_NODE][7] = + UNSUPPORTED_CNT_SEL; + /* DPA_STATS_CNT_CLASSIF_RANGE7 */ + dpa_stats->stats_sel[DPA_STATS_CNT_CLASSIF_NODE][8] = + UNSUPPORTED_CNT_SEL; + /* DPA_STATS_CNT_CLASSIF_RANGE8 */ + dpa_stats->stats_sel[DPA_STATS_CNT_CLASSIF_NODE][9] = + UNSUPPORTED_CNT_SEL; + /* DPA_STATS_CNT_CLASSIF_RANGE9 */ + dpa_stats->stats_sel[DPA_STATS_CNT_CLASSIF_NODE][10] = + UNSUPPORTED_CNT_SEL; + /* DPA_STATS_CNT_CLASSIF_RANGE10 */ + dpa_stats->stats_sel[DPA_STATS_CNT_CLASSIF_NODE][11] = + UNSUPPORTED_CNT_SEL; #endif } @@ -2068,12 +2100,12 @@ static inline void get_cnt_32bit_stats(struct dpa_stats_req_cb *req_cb, for (j = 0; j < stats_info->stats_num; j++) { - if (!stats_info->stats_off[j]) { + if (stats_info->stats_off[j] == UNSUPPORTED_CNT_SEL) { /* Write the memory location */ memset(req_cb->request_area, 0, STATS_VAL_SIZE); /* Update the memory pointer */ - req_cb->request_area += STATS_VAL_SIZE ; + req_cb->request_area += STATS_VAL_SIZE; continue; } |