]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit9eff9c31def02c829cf153a307ece56c6b116db2
treedebb35c7d34deb022cf266708c09283de484ca56
parentcc91dac254bd279ee348afe8640ef6c53b24a41b
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