Commit fabb881df322 for kernel

commit fabb881df322da25442f98d23f5fa371e3c78ec4
Author: Harman Kalra <hkalra@marvell.com>
Date:   Thu Jul 2 10:26:16 2026 +0530

    octeontx2-af: fix VF bringup affecting PF promiscuous state

    Mbox handling of nix_set_rx_mode for a VF with promiscuous and
    all_multi flags set to false causes deletion of the PF's promiscuous
    and allmulti MCAM rules. This occurs because the APIs that
    enable/disable these rules operate only on the PF, even when the
    mbox request is made via a VF interface.

    Guard both rvu_npc_enable_allmulti_entry() and
    rvu_npc_enable_promisc_entry() disable paths with an is_vf() check so
    that a VF bringing up or tearing down its interface cannot inadvertently
    clear the PF's MCAM rules.

    Fixes: 967db3529eca ("octeontx2-af: add support for multicast/promisc packet replication feature")
    Signed-off-by: Harman Kalra <hkalra@marvell.com>
    Signed-off-by: Nitin Shetty J <nshettyj@marvell.com>
    Link: https://patch.msgid.link/20260702045616.3002773-2-nshettyj@marvell.com
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>

diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
index 0297c7ab0614..6a0ce2665031 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
@@ -4580,7 +4580,7 @@ int rvu_mbox_handler_nix_set_rx_mode(struct rvu *rvu, struct nix_rx_mode *req,
 		rvu_npc_install_allmulti_entry(rvu, pcifunc, nixlf,
 					       pfvf->rx_chan_base);
 	} else {
-		if (!nix_rx_multicast)
+		if (!nix_rx_multicast && !is_vf(pcifunc))
 			rvu_npc_enable_allmulti_entry(rvu, pcifunc, nixlf, false);
 	}

@@ -4590,7 +4590,7 @@ int rvu_mbox_handler_nix_set_rx_mode(struct rvu *rvu, struct nix_rx_mode *req,
 					      pfvf->rx_chan_base,
 					      pfvf->rx_chan_cnt);
 	else
-		if (!nix_rx_multicast)
+		if (!nix_rx_multicast && !is_vf(pcifunc))
 			rvu_npc_enable_promisc_entry(rvu, pcifunc, nixlf, false);

 	return 0;