mlxsw: spectrum: Allocate LAG table when in SW LAG mode
authorPetr Machata <petrm@nvidia.com>
Thu, 19 Oct 2023 10:27:19 +0000 (12:27 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 20 Oct 2023 10:47:50 +0000 (11:47 +0100)
commitc678972580aedd28f273afdca94da6bb193ba3e7
treec75abab9f824d1fbe7f82fdf0dc63e5f42c5460f
parent8c893abd64ae662990fb41817011d84c101a4083
mlxsw: spectrum: Allocate LAG table when in SW LAG mode

In this patch, if the LAG mode is SW, allocate the LAG table and configure
SGCR to indicate where it was allocated.

We use the default "DDD" (for dynamic data duplication) layout of the LAG
table. In the DDD mode, the membership information for each LAG is copied
in 8 PGT entries. This is done for performance reasons. The LAG table then
needs to be allocated on an address aligned to 8. Deal with this by
moving the LAG init ahead so that the LAG table is allocated at address 0.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
drivers/net/ethernet/mellanox/mlxsw/spectrum.h