dpaa2-switch: offload shared block mirror filters when binding to a port
authorIoana Ciornei <ioana.ciornei@nxp.com>
Thu, 29 Jul 2021 17:19:00 +0000 (20:19 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 29 Jul 2021 20:34:45 +0000 (21:34 +0100)
commit7a91f9078d4fb683f162112a32bd52b2d21fb5c9
treedebb35c7d34deb022cf266708c09283de484ca56
parent0f3faece58085c94066d14ff9f73e990a55516ac
dpaa2-switch: offload shared block mirror filters when binding to a port

When mirroring rules are added in shared filter blocks, the same
mirroring rule has to be configured on all the switch ports that are
part of the same block.

In case a switch port joins a shared block after mirroring filters have
been already added to it, then all the mirror rules should be offloaded
to the port. The reverse, removal of mirroring rules, has to be done at
block unbind.

For this purpose, the dpaa2_switch_block_offload_mirror() and
dpaa2_switch_block_unoffload_mirror() functions are added and called
upon binding and unbinding a switch port to/from a block.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-flower.c
drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.h