Skip to content

Commit ce21b2d

Browse files
Subbaraya Sundeepcythe
authored andcommitted
octeontx2-af: Remove the PF_FUNC validation for NPC transmit rules
commit cff92db2c796b53a8ed96b13c37c5b3870d83cbc from git@git.assembla.com:cavium/WindRiver.linux.git NPC transmit side mcam rules can use the pcifunc of transmitting device for mcam lookup. The validation done w.r.t pcifunc in mcam rule is not needed and removing these checks help in better switching at transmit side. Change-Id: I6d4005aaa73c023931aeaa353046b0a2ccbf8f27 Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com> Reviewed-on: https://sj1git1.cavium.com/c/IP/SW/kernel/linux/+/104918 Tested-by: sa_ip-sw-jenkins <sa_ip-sw-jenkins@marvell.com> Reviewed-by: Jerin Jacob Kollanukkaran <jerinj@marvell.com> Signed-off-by: Ruiqiang Hao <Ruiqiang.Hao@windriver.com>
1 parent c477b39 commit ce21b2d

File tree

1 file changed

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

1 file changed

+0
-32
lines changed

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

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -61,28 +61,6 @@ int rvu_npc_get_tx_nibble_cfg(struct rvu *rvu, u64 nibble_ena)
6161
return 0;
6262
}
6363

64-
static int npc_mcam_verify_pf_func(struct rvu *rvu,
65-
struct mcam_entry *entry_data, u8 intf,
66-
u16 pcifunc)
67-
{
68-
u16 pf_func, pf_func_mask;
69-
70-
if (is_npc_intf_rx(intf))
71-
return 0;
72-
73-
pf_func_mask = (entry_data->kw_mask[0] >> 32) &
74-
NPC_KEX_PF_FUNC_MASK;
75-
pf_func = (entry_data->kw[0] >> 32) & NPC_KEX_PF_FUNC_MASK;
76-
77-
pf_func = be16_to_cpu((__force __be16)pf_func);
78-
if (pf_func_mask != NPC_KEX_PF_FUNC_MASK ||
79-
((pf_func & ~RVU_PFVF_FUNC_MASK) !=
80-
(pcifunc & ~RVU_PFVF_FUNC_MASK)))
81-
return -EINVAL;
82-
83-
return 0;
84-
}
85-
8664
void rvu_npc_set_pkind(struct rvu *rvu, int pkind, struct rvu_pfvf *pfvf)
8765
{
8866
int blkaddr;
@@ -2823,12 +2801,6 @@ int rvu_mbox_handler_npc_mcam_write_entry(struct rvu *rvu,
28232801
else
28242802
nix_intf = pfvf->nix_rx_intf;
28252803

2826-
if (!is_pffunc_af(pcifunc) &&
2827-
npc_mcam_verify_pf_func(rvu, &req->entry_data, req->intf, pcifunc)) {
2828-
rc = NPC_MCAM_INVALID_REQ;
2829-
goto exit;
2830-
}
2831-
28322804
/* For AF installed rules, the nix_intf should be set to target NIX */
28332805
if (is_pffunc_af(req->hdr.pcifunc))
28342806
nix_intf = req->intf;
@@ -3180,10 +3152,6 @@ int rvu_mbox_handler_npc_mcam_alloc_and_write_entry(struct rvu *rvu,
31803152
if (!is_npc_interface_valid(rvu, req->intf))
31813153
return NPC_MCAM_INVALID_REQ;
31823154

3183-
if (npc_mcam_verify_pf_func(rvu, &req->entry_data, req->intf,
3184-
req->hdr.pcifunc))
3185-
return NPC_MCAM_INVALID_REQ;
3186-
31873155
/* Try to allocate a MCAM entry */
31883156
entry_req.hdr.pcifunc = req->hdr.pcifunc;
31893157
entry_req.contig = true;

0 commit comments

Comments
 (0)