octeontx2-af: Prepare for allocating MCAM rules for AF
authorSubbaraya Sundeep <sbhatta@marvell.com>
Mon, 19 Jul 2021 08:59:33 +0000 (14:29 +0530)
committerDavid S. Miller <davem@davemloft.net>
Mon, 19 Jul 2021 17:24:25 +0000 (10:24 -0700)
commitcb7a6b3bac1d0d773f2b6cc35f6bab61eb5de5ef
tree6a139178d7bab20b2b6c42770a34df0ea676b9fd
parentfa2bf6baf2b1d8350e5193ce4014bdddc51a25d0
octeontx2-af: Prepare for allocating MCAM rules for AF

AF till now only manages the allocation and freeing of
MCAM rules for other PF/VFs in system. To implement
L2 switching between all CGX mapped PF and VFs, AF
requires MCAM entries for DMAC rules for each PF and VF.
This patch modifies AF driver such that AF can also
allocate MCAM rules and install rules for other
PFs and VFs. All the checks like channel verification
for RX rules and PF_FUNC verification for TX rules are
relaxed in case AF is allocating or installing rules.
Also all the entry and counter to owner mappings are
set to NPC_MCAM_INVALID_MAP when they are free indicating
those are not allocated to AF nor PF/VFs.
This patch also ensures that AF allocated and installed
entries are displayed in debugfs.

Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c