]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
octeontx2-af: npc: cn20k: Allocate MCAM entry for flow installation
authorRatheesh Kannoth <rkannoth@marvell.com>
Tue, 24 Feb 2026 08:00:06 +0000 (13:30 +0530)
committerJakub Kicinski <kuba@kernel.org>
Sat, 28 Feb 2026 18:29:26 +0000 (10:29 -0800)
commit9000cada7aa9593df9b0c105f906fdfb43a5b341
tree39d4db1ca604f8cca5fd59b30991604e8d937841
parent645c6e3c19999007446790b4b823452a7b3a3981
octeontx2-af: npc: cn20k: Allocate MCAM entry for flow installation

In CN20K, the PF/VF driver is unaware of the NPC MCAM entry type (x2/x4)
required for a particular TC rule when the user installs rules through the
TC command. This forces the PF/VF driver to first query the AF driver for
the rule size, then allocate an entry, and finally install the flow. This
sequence requires three mailbox request/response exchanges from the PF. To
speed up the installation, the `install_flow` mailbox request message is
extended with additional fields that allow the AF driver to determine the
required NPC MCAM entry type, allocate the MCAM entry, and complete the
flow installation in a single step.

Signed-off-by: Ratheesh Kannoth <rkannoth@marvell.com>
Link: https://patch.msgid.link/20260224080009.4147301-11-rkannoth@marvell.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/marvell/octeontx2/af/cn20k/npc.c
drivers/net/ethernet/marvell/octeontx2/af/cn20k/npc.h
drivers/net/ethernet/marvell/octeontx2/af/mbox.h
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.h
drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c