dpaa2-switch: add support for port mirroring
authorIoana Ciornei <ioana.ciornei@nxp.com>
Thu, 29 Jul 2021 17:18:58 +0000 (20:18 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 29 Jul 2021 20:34:45 +0000 (21:34 +0100)
commite0ead825a1f1c9ea4b3a0bf7f2a7e0e10fb71074
tree65b6a60e526a06b7f1b948b2eaf905533ae97cb5
parentcbc2a8893b599dad7308e647d68e388bc175070e
dpaa2-switch: add support for port mirroring

Add support for per port mirroring for the DPAA2 switch. We support
only single mirror port, therefore we allow mirroring rules only as long
as the destination port is always the same.

Unlike all the actions (drop, redirect, trap) already supported by the
dpaa2-switch driver, adding mirroring filters in shared blocks is not
achieved by a singular ACL entry added in a table shared by the ports.
This is why, when a new mirror filter is added in a block we have to got
through all the switch ports sharing it and configure the filter
individually on all.

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