Skip to content

Commit

Permalink
octeontx2-af: Fix installation of PF multicast rule
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Geetha sowjanya authored and Paolo Abeni committed Dec 10, 2024
1 parent f136552 commit af47a32
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1452,23 +1452,21 @@ int rvu_mbox_handler_npc_install_flow(struct rvu *rvu,
* hence modify pcifunc accordingly.
*/

/* AF installing for a PF/VF */
if (!req->hdr.pcifunc)
if (!req->hdr.pcifunc) {
/* AF installing for a PF/VF */
target = req->vf;

/* PF installing for its VF */
if (!from_vf && req->vf && !from_rep_dev) {
} else if (!from_vf && req->vf && !from_rep_dev) {
/* PF installing for its VF */
target = (req->hdr.pcifunc & ~RVU_PFVF_FUNC_MASK) | req->vf;
pf_set_vfs_mac = req->default_rule &&
(req->features & BIT_ULL(NPC_DMAC));
}

/* Representor device installing for a representee */
if (from_rep_dev && req->vf)
} else if (from_rep_dev && req->vf) {
/* Representor device installing for a representee */
target = req->vf;
else
} else {
/* msg received from PF/VF */
target = req->hdr.pcifunc;
}

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

0 comments on commit af47a32

Please sign in to comment.