summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorBogdan Hamciuc <bogdan.hamciuc@freescale.com>2012-10-27 21:17:27 (GMT)
committerFleming Andrew-AFLEMING <AFLEMING@freescale.com>2013-04-08 23:10:01 (GMT)
commit5c6f7b7e113f3ac022b3778ae02b1beb65b770c5 (patch)
treea9a7363fa03282d225d0035cd29ed59a86ddfbbd /drivers/net
parent20c2598fa3fc19fbf282fa0613a2d381855221ea (diff)
downloadlinux-fsl-qoriq-5c6f7b7e113f3ac022b3778ae02b1beb65b770c5.tar.xz
dpaa_eth: Reset congestion stats after display
Be consistent with the QMan CGR API and reset the per-netdev congestion stats that we display, after each user read from debugfs. Change-Id: I21fd55445784dd91dfd7fd7a0ee56884d24f49ee Signed-off-by: Bogdan Hamciuc <bogdan.hamciuc@freescale.com> (cherry picked from commit 807a1a94304ce6f5bcbffefa5a6dea78257a3e8c) Reviewed-on: http://git.am.freescale.net:8181/1034 Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/freescale/dpa/dpaa_eth.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpa/dpaa_eth.c
index 530b08e..6966df4 100644
--- a/drivers/net/ethernet/freescale/dpa/dpaa_eth.c
+++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth.c
@@ -2991,6 +2991,9 @@ static int __cold dpa_debugfs_show(struct seq_file *file, void *offset)
"Current congestion state is: %s.\n",
priv->cgr_data.cgr_congested_count,
query_cgr.cgr.cs ? "congested" : "not congested");
+ /* Reset congestion stats (like QMan CGR API does) */
+ priv->cgr_data.congested_jiffies = 0;
+ priv->cgr_data.cgr_congested_count = 0;
/* Rx Errors demultiplexing */
seq_printf(file, "\nDPA RX Errors:\nCPU dma err phys err" \