octeontx2-af: add support for custom KPU entries
authorStanislaw Kardach <skardach@marvell.com>
Thu, 27 May 2021 09:44:35 +0000 (15:14 +0530)
committerJakub Kicinski <kuba@kernel.org>
Sat, 29 May 2021 21:16:21 +0000 (14:16 -0700)
commit3a7244152f9c22f32f37dfba2a9b070a90bf877a
treea7a3a8304fb58e567e5516267b600d85395fba12
parent015dbf5662fd689d581c0bc980711b073ca09a1a
octeontx2-af: add support for custom KPU entries

Add ability to load a set of custom KPU entries. This
allows for flexible support for custom protocol parsing.

AF driver will attempt to load the profile and verify if it can fit
hardware capabilities. If not, it will revert to the built-in profile.

Next it will replace the first KPU_MAX_CST_LT (2) entries in each KPU
in default profile with entries read from the profile image.
The built-in profile should always contain KPU_MAX_CSR_LT first no-match
entries and AF driver will disable those in the KPU unless custom
profile is loaded.

Profile file contains also a list of default protocol overrides to
allow for custom protocols to be used there.

Signed-off-by: Stanislaw Kardach <skardach@marvell.com>
Signed-off-by: George Cherian <george.cherian@marvell.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/marvell/octeontx2/af/npc.h
drivers/net/ethernet/marvell/octeontx2/af/npc_profile.h
drivers/net/ethernet/marvell/octeontx2/af/rvu.c
drivers/net/ethernet/marvell/octeontx2/af/rvu.h
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c