net: dsa: qca8k: add LAG support
authorAnsuel Smith <ansuelsmth@gmail.com>
Tue, 23 Nov 2021 02:59:11 +0000 (03:59 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 23 Nov 2021 11:53:16 +0000 (11:53 +0000)
commitdef975307c01191b6f0170048c3724b0ed3348af
tree9dde3c48f8c95c2d52f3f2aad42a7e3815c0917d
parent2c1bdbc7e7560d7de754cad277d968d56bb1899e
net: dsa: qca8k: add LAG support

Add LAG support to this switch. In Documentation this is described as
trunk mode. A max of 4 LAGs are supported and each can support up to 4
port. The current tx mode supported is Hash mode with both L2 and L2+3
mode.
When no port are present in the trunk, the trunk is disabled in the
switch.
When a port is disconnected, the traffic is redirected to the other
available port.
The hash mode is global and each LAG require to have the same hash mode
set. To change the hash mode when multiple LAG are configured, it's
required to remove each LAG and set the desired hash mode to the last.
An error is printed when it's asked to set a not supported hadh mode.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/qca8k.c
drivers/net/dsa/qca8k.h