octeontx2-pf: Fix promisc mcam entry action
authorHariprasad Kelam <hkelam@marvell.com>
Fri, 8 Dec 2023 06:56:09 +0000 (12:26 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Dec 2023 16:01:47 +0000 (17:01 +0100)
commit5295d2ad9103381daba63b206b34cfed08bdba69
tree778f2bdf1678685b6b1304d3516cbc8efc09eac2
parent6047060105e44c7108c715535fc92c0226995a40
octeontx2-pf: Fix promisc mcam entry action

[ Upstream commit dbda436824ded8ef6a05bb82cd9baa8d42377a49 ]

Current implementation is such that, promisc mcam entry action
is set as multicast even when there are no trusted VFs. multicast
action causes the hardware to copy packet data, which reduces
the performance.

This patch fixes this issue by setting the promisc mcam entry action to
unicast instead of multicast when there are no trusted VFs. The same
change is made for the 'allmulti' mcam entry action.

Fixes: ffd2f89ad05c ("octeontx2-pf: Enable promisc/allmulti match MCAM entries.")
Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c