]> git.baikalelectronics.ru Git - kernel.git/commit
octeontx2-af: Add debugfs entry to dump the MCAM rules
authorSubbaraya Sundeep <sbhatta@marvell.com>
Sat, 14 Nov 2020 19:52:57 +0000 (01:22 +0530)
committerJakub Kicinski <kuba@kernel.org>
Tue, 17 Nov 2020 21:48:21 +0000 (13:48 -0800)
commitddc14af159c030570e16d53621fd42ce15073175
tree5f09520d4fe419a181aa96a551411b862a4d6eec
parent4b9838021e057189753eead0fd0a008caff4b57d
octeontx2-af: Add debugfs entry to dump the MCAM rules

Add debugfs support to dump the MCAM rules installed using
NPC_INSTALL_FLOW mbox message. Debugfs file can display mcam
entry, counter if any, flow type and counter hits.

Ethtool will dump the ntuple flows related to the PF only.
The debugfs file gives systemwide view of the MCAM rules
installed by all the PF's.

Below is the example output when the debugfs file is read:
~ # mount -t debugfs none /sys/kernel/debug
~ # cat /sys/kernel/debug/octeontx2/npc/mcam_rules

Installed by: PF1
direction: RX
        mcam entry: 227
udp source port 23 mask 0xffff
Forward to: PF1 VF0
        action: Direct to queue 0
enabled: yes
        counter: 1
        hits: 0

Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
Signed-off-by: Naveen Mamindlapalli <naveenm@marvell.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c