Skip to content

Commit

Permalink
Revert "octeontx2-af: npc: cn20k: Get base steer rule index."
Browse files Browse the repository at this point in the history
This reverts commit 908d71b.

This patch is no longer needed here as separate new mailbox
NPC_CN20K_MCAM_READ_BASE_RULE is available for cn20k.

Change-Id: I7cefaf47e1e9f1e21129ff4daf5358a1fa0acbe6
Signed-off-by: Rahul Bhansali <[email protected]>
Reviewed-on: https://sj1git1.cavium.com/c/IP/SW/kernel/linux/+/145402
Tested-by: sa_ip-sw-jenkins <[email protected]>
Reviewed-by: Devapraba Muthumani <[email protected]>
  • Loading branch information
rbhansali authored and mdevapraba committed Feb 11, 2025
1 parent 0bc1312 commit 8cb7415
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3992,17 +3992,6 @@ int rvu_mbox_handler_npc_set_pkind(struct rvu *rvu,
req->var_len_off_mask, req->shift_dir);
}

static int rvu_npc_get_base_steer_rule_type(struct rvu *rvu, u16 pcifunc)
{
if (!is_cn20k(rvu->pdev))
return NIXLF_UCAST_ENTRY;

if (is_lbk_vf(rvu, pcifunc))
return NIXLF_PROMISC_ENTRY;

return NIXLF_UCAST_ENTRY;
}

int rvu_mbox_handler_npc_read_base_steer_rule(struct rvu *rvu,
struct msg_req *req,
struct npc_mcam_read_base_rule_rsp *rsp)
Expand All @@ -4012,7 +4001,6 @@ int rvu_mbox_handler_npc_read_base_steer_rule(struct rvu *rvu,
u16 pcifunc = req->hdr.pcifunc;
struct rvu_pfvf *pfvf;
u8 intf, enable;
int rl_type;

blkaddr = rvu_get_blkaddr(rvu, BLKTYPE_NPC, 0);
if (blkaddr < 0)
Expand All @@ -4038,12 +4026,9 @@ int rvu_mbox_handler_npc_read_base_steer_rule(struct rvu *rvu,
mutex_unlock(&mcam->lock);
goto out;
}

rl_type = rvu_npc_get_base_steer_rule_type(rvu, pcifunc);

/* Read the default ucast entry if there is no pkt steering rule */
index = npc_get_nixlf_mcam_index(rvu, mcam, pcifunc, nixlf,
rl_type);
NIXLF_UCAST_ENTRY);
read_entry:
/* Read the mcam entry */
npc_read_mcam_entry(rvu, mcam, blkaddr, index, &rsp->entry, &intf,
Expand Down

0 comments on commit 8cb7415

Please sign in to comment.