Skip to content

Commit af47a32

Browse files
Geetha sowjanyaPaolo Abeni
Geetha sowjanya
authored and
Paolo Abeni
committed
octeontx2-af: Fix installation of PF multicast rule
Due to target variable is being reassigned in npc_install_flow() function, PF multicast rules are not getting installed. This patch addresses the issue by fixing the "IF" condition checks when rules are installed by AF. Fixes: 6c40ca9 ("octeontx2-pf: Adds TC offload support"). Signed-off-by: Geetha sowjanya <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
1 parent f136552 commit af47a32

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

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

+8-10
Original file line numberDiff line numberDiff line change
@@ -1452,23 +1452,21 @@ int rvu_mbox_handler_npc_install_flow(struct rvu *rvu,
14521452
* hence modify pcifunc accordingly.
14531453
*/
14541454

1455-
/* AF installing for a PF/VF */
1456-
if (!req->hdr.pcifunc)
1455+
if (!req->hdr.pcifunc) {
1456+
/* AF installing for a PF/VF */
14571457
target = req->vf;
1458-
1459-
/* PF installing for its VF */
1460-
if (!from_vf && req->vf && !from_rep_dev) {
1458+
} else if (!from_vf && req->vf && !from_rep_dev) {
1459+
/* PF installing for its VF */
14611460
target = (req->hdr.pcifunc & ~RVU_PFVF_FUNC_MASK) | req->vf;
14621461
pf_set_vfs_mac = req->default_rule &&
14631462
(req->features & BIT_ULL(NPC_DMAC));
1464-
}
1465-
1466-
/* Representor device installing for a representee */
1467-
if (from_rep_dev && req->vf)
1463+
} else if (from_rep_dev && req->vf) {
1464+
/* Representor device installing for a representee */
14681465
target = req->vf;
1469-
else
1466+
} else {
14701467
/* msg received from PF/VF */
14711468
target = req->hdr.pcifunc;
1469+
}
14721470

14731471
/* ignore chan_mask in case pf func is not AF, revisit later */
14741472
if (!is_pffunc_af(req->hdr.pcifunc))

0 commit comments

Comments
 (0)