]> www.infradead.org Git - users/jedix/linux-maple.git/commit
octeontx2-af: NPC: Clear Unicast rule on nixlf detach
authorHariprasad Kelam <hkelam@marvell.com>
Tue, 20 May 2025 06:09:52 +0000 (11:39 +0530)
committerDavid S. Miller <davem@davemloft.net>
Sun, 25 May 2025 14:06:53 +0000 (15:06 +0100)
commitbb91f7547f79434e8818d3f235437e021d34c1cb
tree36275a4e276841e4b07a10943a83612cfe6fca19
parent819aad967d4a71af18cd889097363c0a9d377c7a
octeontx2-af: NPC: Clear Unicast rule on nixlf detach

The AF driver assigns reserved MCAM entries (for unicast, broadcast,
etc.) based on the NIXLF number. When a NIXLF is detached, these entries
are disabled.

For example,

         PF           NIXLF
        --------------------
         PF0             0
         SDP-VF0         1

If the user unbinds both PF0 and SDP-VF0 interfaces and then binds them in
reverse order

         PF            NIXLF
        ---------------------
         SDP-VF0         0
         PF0             1

In this scenario, the PF0 unicast entry is getting corrupted because
the MCAM entry contains stale data (SDP-VF0 ucast data)

This patch resolves the issue by clearing the unicast MCAM entry during
NIXLF detach

Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/octeontx2/af/rvu.c
drivers/net/ethernet/marvell/octeontx2/af/rvu.h
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c