OSDN Git Service

net: lan966x: Add support to offload the forwarding.
authorHoratiu Vultur <horatiu.vultur@microchip.com>
Sat, 18 Dec 2021 21:49:43 +0000 (22:49 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 Dec 2021 11:44:05 +0000 (11:44 +0000)
commitcf2f60897e921e338f2bcca9f2acbb3fc1686131
tree47d2ef7a669b493d2d5860f615c8385b6f3cf650
parent571bb516a869a67accba9cd907242596f3782605
net: lan966x: Add support to offload the forwarding.

This patch adds basic support to offload in the HW the forwarding of the
frames. The driver registers to the switchdev callbacks and implements
the callbacks for attributes SWITCHDEV_ATTR_ID_PORT_STP_STATE and
SWITCHDEV_ATTR_ID_BRIDGE_AGEING_TIME.
It is not allowed to add a lan966x port to a bridge that contains a
different interface than lan966x.

Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/microchip/lan966x/Kconfig
drivers/net/ethernet/microchip/lan966x/Makefile
drivers/net/ethernet/microchip/lan966x/lan966x_main.c
drivers/net/ethernet/microchip/lan966x/lan966x_main.h
drivers/net/ethernet/microchip/lan966x/lan966x_switchdev.c [new file with mode: 0644]