]> git.baikalelectronics.ru Git - kernel.git/commit
dpaa2-switch: add support for configuring learning state per port
authorIoana Ciornei <ioana.ciornei@nxp.com>
Mon, 22 Mar 2021 20:58:56 +0000 (22:58 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Mar 2021 23:37:44 +0000 (16:37 -0700)
commitfebd48d884c9e768a9b397143ddbbe62f1686353
tree5835454d5da8c9ad2d3ccbf3e85e4e28e4286725
parent994cd8efdd48e0c2076c8a76924d3e4f999cce06
dpaa2-switch: add support for configuring learning state per port

Add support for configuring the learning state of a switch port.
When the user requests the HW learning to be disabled, a fast-age
procedure on that specific port is run so that previously learnt
addresses do not linger.

At device probe as well as on a bridge leave action, the ports are
configured with HW learning disabled since they are basically a
standalone port.

At the same time, at bridge join we inherit the bridge port BR_LEARNING
flag state and configure it on the switch port.

There were already some MC firmware ABI functions for changing the
learning state, but those were per FDB (bridging domain) and not per
port so we need to adjust those to use the new MC fw command which is
per port.

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.c
drivers/net/ethernet/freescale/dpaa2/dpsw-cmd.h
drivers/net/ethernet/freescale/dpaa2/dpsw.c
drivers/net/ethernet/freescale/dpaa2/dpsw.h