mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net] octeontx2-af: Fix keep PF_FUNC match for AF TX rules in rep mode
@ 2026-11-09 10:50 kmahammadraf
  2026-11-09 10:55 ` netdev-bot+sinfo
  0 siblings, 1 reply; 2+ messages in thread
From: kmahammadraf @ 2026-11-09 10:50 UTC (permalink / raw)
  To: linux-kernel, netdev
  Cc: Sunil Goutham, Ratheesh Kannoth, Geetha sowjanya,
	Subbaraya Sundeep, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Aditya Thapliyal, kmahammadraf

From: Aditya Thapliyal <athapliyal@marvell.com>

In representor mode, AF installs TX MCAM rules for representor traffic.
These TX rules must match on PF_FUNC to identify the correct target
function.

Currently, npc_update_tx_entry() clears PF_FUNC mask for AF-requested
rules. In rep_mode, that wildcard can make a TX rule match traffic for
other representors on the same TX interface, which can steer egress
traffic through the wrong rule.

Fix this by not clearing PF_FUNC mask for AF-installed TX rules when
rep_mode is enabled.

Fixes: 683645a2317e ("octeontx2-af: Add packet path between representor and VF")

Signed-off-by: kmahammadraf <kmahammadraf@marvell.com>
Signed-off-by: Aditya Thapliyal <athapliyal@marvell.com>

---
v2: https://lore.kernel.org/netdev/179292714974.3134.12015701378835588497@kernel.org/

    -Drop the channel-handling change from this patch.
    -Keep this patch focused on PF_FUNC mask handling in representor mode.
    -Clarify the representor TX symptom in the commit message.
---
 drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 ec004ea5154c..4afd4a10cd64 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c
@@ -1396,7 +1396,7 @@ static int npc_update_tx_entry(struct rvu *rvu, struct rvu_pfvf *pfvf,
 	/* If AF is installing then do not care about
 	 * PF_FUNC in Send Descriptor
 	 */
-	if (is_pffunc_af(req->hdr.pcifunc))
+	if (is_pffunc_af(req->hdr.pcifunc) && !rvu->rep_mode)
 		mask = 0;
 
 	npc_update_entry(rvu, NPC_PF_FUNC, mdata, (__force u16)htons(target),
-- 
2.25.1


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

end of thread, other threads:[~2026-11-09 10:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-09 10:50 [PATCH net] octeontx2-af: Fix keep PF_FUNC match for AF TX rules in rep mode kmahammadraf
2026-11-09 10:55 ` netdev-bot+sinfo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®