]> git.baikalelectronics.ru Git - kernel.git/commit
net: mvpp2: debugfs: add hit counter stats for Header Parser entries
authorMaxime Chevallier <maxime.chevallier@bootlin.com>
Sat, 14 Jul 2018 11:29:26 +0000 (13:29 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Jul 2018 07:10:01 +0000 (00:10 -0700)
commitb120466554ef238cacbe801a47fa5480ac1da99a
treebe19b0d598ad755c76d373999f61ed53bc36ad55
parenta8fd6ab057372c4cb8bb56bf4704695235506ce3
net: mvpp2: debugfs: add hit counter stats for Header Parser entries

One helpful feature to help debug the Header Parser TCAM filter in PPv2
is to be able to see if the entries did match something when a packet
comes in. This can be done by using the built-in hit counter for TCAM
entries.

This commit implements reading the counter, and exposing its value on
debugfs for each filter entry.

The counter is a 16-bits clear-on-read value, located at:
 .../mvpp2/<controller>/parser/XXX/hits

Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvpp2/mvpp2.h
drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c
drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c
drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.h