]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit8dc6a0a10e75d7e03552351d11a7d5ebfbf42842
tree6a139178d7bab20b2b6c42770a34df0ea676b9fd
parent678c92e9b58b94294aba2e6458a2a236b68f11b4
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