diff options
author | MD Danish Anwar <danishanwar@ti.com> | 2023-08-01 12:14:25 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-08-02 12:38:11 +0300 |
commit | c1e10d5dc7a1be8d4eba8560540e20bd03c2be01 (patch) | |
tree | 9d5ee5132610c50b60c7e0c66d77a9a83e82d503 /drivers/net/ethernet/ti/Makefile | |
parent | 128d5874c0822105ae9556d5435fb8562aff2e3b (diff) | |
download | linux-c1e10d5dc7a1be8d4eba8560540e20bd03c2be01.tar.xz |
net: ti: icssg-prueth: Add ICSSG Stats
Add icssg_stats.c to help dump, icssg related driver statistics.
ICSSG has hardware registers for providing statistics like total rx bytes,
total tx bytes, etc. These registers are of 32 bits and hence in case of 1G
link, they overflows in around 32 seconds. The behaviour of these registers
is such that they don't roll back to 0 after overflow but rather stay at
UINT_MAX.
These registers support a feature where the value written to them is
subtracted from the register. This feature can be utilized to fix the
overflowing of stats.
This solution uses a Workqueues based solution where a function gets
called before the registers overflow (every 25 seconds in 1G link, 25000
seconds in 100M link), this function saves the register
values in local variables and writes the last read value to the
register. So any update during the read will be taken care of.
Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ti/Makefile')
-rw-r--r-- | drivers/net/ethernet/ti/Makefile | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/ti/Makefile b/drivers/net/ethernet/ti/Makefile index efb050cbb4a8..03d9b2b36b5f 100644 --- a/drivers/net/ethernet/ti/Makefile +++ b/drivers/net/ethernet/ti/Makefile @@ -36,3 +36,4 @@ icssg-prueth-y := k3-cppi-desc-pool.o \ icssg/icssg_queues.o \ icssg/icssg_config.o \ icssg/icssg_mii_cfg.o \ + icssg/icssg_stats.o \ |