octeontx2-pf: Fix algorithm index in MCAM rules with RSS action
authorSunil Goutham <sgoutham@marvell.com>
Sun, 22 Aug 2021 12:02:26 +0000 (17:32 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Sep 2021 08:02:26 +0000 (10:02 +0200)
commit392faa331b1190eebb00870ba1bc4423828a72e5
tree96d0a39bc9eb54865b8fdbeeca642ee87ada5910
parent301e0b3c77c06fae3b208e27e7f8c3f41a81104e
octeontx2-pf: Fix algorithm index in MCAM rules with RSS action

[ Upstream commit e7938365459f3a6d4edf212f435c4ad635621450 ]

Otherthan setting action as RSS in NPC MCAM entry, RSS flowkey
algorithm index also needs to be set. Otherwise whatever algorithm
is defined at flowkey index '0' will be considered by HW and pkt
flows will be distributed as such.

Fix this by saving the flowkey index sent by admin function while
initializing RSS and then use it when framing MCAM rules.

Fixes: 81a4362016e7 ("octeontx2-pf: Add RSS multi group support")
Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c