Skip to content

Commit f2e4568

Browse files
Subbaraya Sundeepdavem330
authored andcommitted
octeontx2-af: Fix mailbox errors in nix_rss_flowkey_cfg
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: 55307fc ("octeontx2-af: Add mbox messages to install and delete MCAM rules") Signed-off-by: Subbaraya Sundeep <[email protected]> Signed-off-by: Sunil Goutham <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 6537e96 commit f2e4568

File tree

1 file changed

+3
-3
lines changed
  • drivers/net/ethernet/marvell/octeontx2/af

1 file changed

+3
-3
lines changed

drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -915,7 +915,7 @@ void rvu_npc_enable_allmulti_entry(struct rvu *rvu, u16 pcifunc, int nixlf,
915915
static void npc_update_vf_flow_entry(struct rvu *rvu, struct npc_mcam *mcam,
916916
int blkaddr, u16 pcifunc, u64 rx_action)
917917
{
918-
int actindex, index, bank;
918+
int actindex, index, bank, entry;
919919
bool enable;
920920

921921
if (!(pcifunc & RVU_PFVF_FUNC_MASK))
@@ -926,7 +926,7 @@ static void npc_update_vf_flow_entry(struct rvu *rvu, struct npc_mcam *mcam,
926926
if (mcam->entry2target_pffunc[index] == pcifunc) {
927927
bank = npc_get_bank(mcam, index);
928928
actindex = index;
929-
index &= (mcam->banksize - 1);
929+
entry = index & (mcam->banksize - 1);
930930

931931
/* read vf flow entry enable status */
932932
enable = is_mcam_entry_enabled(rvu, mcam, blkaddr,
@@ -936,7 +936,7 @@ static void npc_update_vf_flow_entry(struct rvu *rvu, struct npc_mcam *mcam,
936936
false);
937937
/* update 'action' */
938938
rvu_write64(rvu, blkaddr,
939-
NPC_AF_MCAMEX_BANKX_ACTION(index, bank),
939+
NPC_AF_MCAMEX_BANKX_ACTION(entry, bank),
940940
rx_action);
941941
if (enable)
942942
npc_enable_mcam_entry(rvu, mcam, blkaddr,

0 commit comments

Comments
 (0)