octeontx2-af: Modify default KEX profile to extract TX packet fields
authorStanislaw Kardach <skardach@marvell.com>
Sat, 14 Nov 2020 19:52:51 +0000 (01:22 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 Mar 2021 12:32:02 +0000 (14:32 +0200)
commit1055796ca03132e028a0a0a9b3118943b1e73f0c
tree9b8dfe7bd11e2fade47205b1a648755630dac019
parentf896ae2886d18c7875e4a1ddd9b4d9bf152ed0e8
octeontx2-af: Modify default KEX profile to extract TX packet fields

[ Upstream commit f1517f6f1d6fd97a18836b0fb6921f2cb105eeb4 ]

The current default Key Extraction(KEX) profile can only use RX
packet fields while generating the MCAM search key. The profile
can't be used for matching TX packet fields. This patch modifies
the default KEX profile to add support for extracting TX packet
fields into MCAM search key. Enabled Tx KPU packet parsing by
configuring TX PKIND in tx_parse_cfg.

Modified the KEX profile to extract 2 bytes of VLAN TCI from an
offset of 2 bytes from LB_PTR. The LB_PTR points to the byte offset
where the VLAN header starts. The NPC KPU parser profile has been
modified to point LB_PTR to the starting byte offset of VLAN header
which points to the tpid field.

Signed-off-by: Stanislaw Kardach <skardach@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>
Signed-off-by: Sasha Levin <sashal@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_nix.c