summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSubbaraya Sundeep <sbhatta@marvell.com>2021-08-30 23:30:44 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-09-15 10:02:31 +0200
commita991d7f1d52b2859da95b3102c3f853b83e5ca2e (patch)
treef3c2e9f209239acc6a2f79132a2cce911d6e659f
parent1fc7fd26a6285032b9a7502854b3f176d6b9edf2 (diff)
downloadlinux-stable-a991d7f1d52b2859da95b3102c3f853b83e5ca2e.tar.gz
linux-stable-a991d7f1d52b2859da95b3102c3f853b83e5ca2e.tar.bz2
linux-stable-a991d7f1d52b2859da95b3102c3f853b83e5ca2e.zip
octeontx2-af: Fix mailbox errors in nix_rss_flowkey_cfg
[ Upstream commit f2e4568ec95166605c77577953b2787c7f909978 ] In npc_update_vf_flow_entry function the loop cursor 'index' is being changed inside the loop causing the loop to spin forever. This in turn hogs the kworker thread forever and no other mbox message is processed by AF driver after that. Fix this by using another variable in the loop. Fixes: 55307fcb9258 ("octeontx2-af: Add mbox messages to install and delete MCAM rules") Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com> 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>
-rw-r--r--drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c
index 38e8d58cf8a0..0122310ee3a7 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c
@@ -938,7 +938,7 @@ void rvu_npc_enable_allmulti_entry(struct rvu *rvu, u16 pcifunc, int nixlf,
static void npc_update_vf_flow_entry(struct rvu *rvu, struct npc_mcam *mcam,
int blkaddr, u16 pcifunc, u64 rx_action)
{
- int actindex, index, bank;
+ int actindex, index, bank, entry;
bool enable;
if (!(pcifunc & RVU_PFVF_FUNC_MASK))
@@ -949,7 +949,7 @@ static void npc_update_vf_flow_entry(struct rvu *rvu, struct npc_mcam *mcam,
if (mcam->entry2target_pffunc[index] == pcifunc) {
bank = npc_get_bank(mcam, index);
actindex = index;
- index &= (mcam->banksize - 1);
+ entry = index & (mcam->banksize - 1);
/* read vf flow entry enable status */
enable = is_mcam_entry_enabled(rvu, mcam, blkaddr,
@@ -959,7 +959,7 @@ static void npc_update_vf_flow_entry(struct rvu *rvu, struct npc_mcam *mcam,
false);
/* update 'action' */
rvu_write64(rvu, blkaddr,
- NPC_AF_MCAMEX_BANKX_ACTION(index, bank),
+ NPC_AF_MCAMEX_BANKX_ACTION(entry, bank),
rx_action);
if (enable)
npc_enable_mcam_entry(rvu, mcam, blkaddr,