[PATCH net] octeontx2-af: Fix representor flow rule PF_FUNC mask and channel In representor mode, an AF-installed TX rule must still match on PF_FUNC, so do not clear the mask when rep_mode is set. Also, do not overwrite a channel already provided in the request when the rule comes from a representor device; only default to the PF/VF rx_chan_base when none is given.

From: kmahammadraf

Date: Wed Oct 21 2026 - 05:19:55 EST


From: Aditya Thapliyal <athapliyal@xxxxxxxxxxx>

Fixes: 6c40ca957fe5 ("octeontx2-pf: Adds TC offload support")
Signed-off-by: kmahammadraf <kmahammadraf@xxxxxxxxxxx>
Signed-off-by: Aditya Thapliyal <athapliyal@xxxxxxxxxxx>
---
---
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c | 4 ++--
1 file changed, 2 insertions(+), 2 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 d422bdd5e8f8..a569a63a21d9 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c
@@ -1397,7 +1397,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),
@@ -1846,7 +1846,7 @@ int rvu_mbox_handler_npc_install_flow(struct rvu *rvu,

pfvf = rvu_get_pfvf(rvu, target);

- if (from_rep_dev)
+ if (from_rep_dev && !req->channel)
req->channel = pfvf->rx_chan_base;
/* PF installing for its VF */
if (req->hdr.pcifunc && !from_vf && req->vf && !from_rep_dev)
--
2.25.1