octeontx2-af: Generate key field bit mask from KEX profile
authorSubbaraya Sundeep <sbhatta@marvell.com>
Sat, 14 Nov 2020 19:52:53 +0000 (01:22 +0530)
committerJakub Kicinski <kuba@kernel.org>
Tue, 17 Nov 2020 21:48:20 +0000 (13:48 -0800)
commit9b179a960a96d5ffd960a3f92f4536be0dda7f37
tree2aea58788ed6c1f3796d789f6c92f08cb7371431
parent041a1c171581f5b7016fd9200493ee4455f0afc1
octeontx2-af: Generate key field bit mask from KEX profile

Key Extraction(KEX) profile decides how the packet metadata such as
layer information and selected packet data bytes at each layer are
placed in MCAM search key. This patch reads the configured KEX profile
parameters to find out the bit position and bit mask for each field.
The information is used when programming the MCAM match data by SW
to match a packet flow and take appropriate action on the flow. This
patch also verifies the mandatory fields such as channel and DMAC
are not overwritten by the KEX configuration of other fields.

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/Makefile
drivers/net/ethernet/marvell/octeontx2/af/npc.h
drivers/net/ethernet/marvell/octeontx2/af/rvu.h
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c [new file with mode: 0644]