netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net v2 PATCH] octeontx2-af: Fix installation of PF multicast rule
@ 2024-12-05 11:34 Geetha sowjanya
  2024-12-09 11:28 ` Simon Horman
  2024-12-10  9:30 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Geetha sowjanya @ 2024-12-05 11:34 UTC (permalink / raw)
  To: netdev, linux-kernel
  Cc: kuba, davem, pabeni, horms, andrew+netdev, edumazet, sgoutham,
	gakula, sbhatta, hkelam

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: 6c40ca957fe5 ("octeontx2-pf: Adds TC offload support").
Signed-off-by: Geetha sowjanya <gakula@marvell.com>
---

v1-v2:
 -Restructured the code.

 .../ethernet/marvell/octeontx2/af/rvu_npc_fs.c | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c
index da69e454662a..1b765045aa63 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c
@@ -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))
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [net v2 PATCH] octeontx2-af: Fix installation of PF multicast rule
  2024-12-05 11:34 [net v2 PATCH] octeontx2-af: Fix installation of PF multicast rule Geetha sowjanya
@ 2024-12-09 11:28 ` Simon Horman
  2024-12-10  9:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2024-12-09 11:28 UTC (permalink / raw)
  To: Geetha sowjanya
  Cc: netdev, linux-kernel, kuba, davem, pabeni, andrew+netdev,
	edumazet, sgoutham, sbhatta, hkelam

On Thu, Dec 05, 2024 at 05:04:35PM +0530, Geetha sowjanya wrote:
> 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: 6c40ca957fe5 ("octeontx2-pf: Adds TC offload support").
> Signed-off-by: Geetha sowjanya <gakula@marvell.com>

Reviewed-by: Simon Horman <horms@kernel.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [net v2 PATCH] octeontx2-af: Fix installation of PF multicast rule
  2024-12-05 11:34 [net v2 PATCH] octeontx2-af: Fix installation of PF multicast rule Geetha sowjanya
  2024-12-09 11:28 ` Simon Horman
@ 2024-12-10  9:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-12-10  9:30 UTC (permalink / raw)
  To: Geetha sowjanya
  Cc: netdev, linux-kernel, kuba, davem, pabeni, horms, andrew+netdev,
	edumazet, sgoutham, sbhatta, hkelam

Hello:

This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Thu, 5 Dec 2024 17:04:35 +0530 you wrote:
> 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: 6c40ca957fe5 ("octeontx2-pf: Adds TC offload support").
> Signed-off-by: Geetha sowjanya <gakula@marvell.com>
> 
> [...]

Here is the summary with links:
  - [net,v2] octeontx2-af: Fix installation of PF multicast rule
    https://git.kernel.org/netdev/net/c/af47a328e813

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-12-10  9:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-05 11:34 [net v2 PATCH] octeontx2-af: Fix installation of PF multicast rule Geetha sowjanya
2024-12-09 11:28 ` Simon Horman
2024-12-10  9:30 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).