]> 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)
commitedc518a52b2092f172e014506f6bfd1711c5c502
treed1823f245e4327096e782eac16a91c882582a379
parent2fdd103ca448b4bb79c9f7474fd7fe0222fa9d93
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