]> git.baikalelectronics.ru Git - kernel.git/commit
octeontx2-af: Map or unmap NPC MCAM entry and counter
authorSunil Goutham <sgoutham@marvell.com>
Mon, 19 Nov 2018 10:47:30 +0000 (16:17 +0530)
committerDavid S. Miller <davem@davemloft.net>
Tue, 20 Nov 2018 01:56:08 +0000 (17:56 -0800)
commitcfd7ee7b7e743727b1ddde68b50837600d140ca3
treed1823f245e4327096e782eac16a91c882582a379
parent7d417a303e77bfb725d451cccdc8242b77382d02
octeontx2-af: Map or unmap NPC MCAM entry and counter

Alloc memory to save MCAM 'entry to counter' mapping and since
multiple entries can map to same counter, added counter's reference
count tracking.

Do 'entry to counter' mapping when a entry is being installed
and mbox msg sender requested to configure a counter as well.
Mapping is removed when a entry or counter is being freed or
a explicit mbox msg is received to unmap them.

Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/octeontx2/af/mbox.h
drivers/net/ethernet/marvell/octeontx2/af/rvu.h
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c