octeontx2-af: Adjust LA pointer for cpt parse header
authorKiran Kumar K <kirankumark@marvell.com>
Wed, 29 Sep 2021 05:58:31 +0000 (11:28 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Mar 2022 18:12:39 +0000 (19:12 +0100)
commit63138001c96150b63cc39a7082b7e4885fbab6f8
tree10bf25d3ce07c86589e97698b1917617fc9013bb
parentab3380a844aadffa603c8715fc56c0bf55583bd5
octeontx2-af: Adjust LA pointer for cpt parse header

[ Upstream commit 85212a127e469c5560daf63a9782755ee4b03619 ]

In case of ltype NPC_LT_LA_CPT_HDR, LA pointer is pointing to the
start of cpt parse header. Since cpt parse header has veriable
length padding, this will be a problem for DMAC extraction. Adding
KPU profile changes to adjust the LA pointer to start at ether header
in case of cpt parse header by
   - Adding ptr advance in pkind 58 to a fixed value 40
   - Adding variable length offset 7 and mask 7 (pad len in
     CPT_PARSE_HDR).
Also added the missing static declaration for npc_set_var_len_offset_pkind
function.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/marvell/octeontx2/af/npc_profile.h
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c