]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commita28ca26aac63f0a4242c167488470d11caf823cf
tree9dde3c48f8c95c2d52f3f2aad42a7e3815c0917d
parent1b2f4ef2f9fa774114eae577d5028c234acb774c
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