mlxsw: core, pci: Add plumbing related to LAG mode
authorPetr Machata <petrm@nvidia.com>
Thu, 19 Oct 2023 10:27:15 +0000 (12:27 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 20 Oct 2023 10:47:49 +0000 (11:47 +0100)
commitb2e9b1fe8c2e096782c10db868889c64ef8f8a53
treee728e981494a6cbf3d726d28baa495e3d822a7e8
parent8eabd10cdce4fc30e4357eab1fd102530fb09275
mlxsw: core, pci: Add plumbing related to LAG mode

lag_mode describes where the responsibility for LAG table placement lies:
SW or FW. The bus module determines whether LAG is supported, can configure
it if it is, and knows what (if any) configuration has been applied.
Therefore add a bus callback to determine the configured LAG mode. Also add
to core an API to query it.

The LAG mode is for now kept at the default value of 0 for FW-managed. The
code to actually toggle it will be added later.

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/core.c
drivers/net/ethernet/mellanox/mlxsw/core.h
drivers/net/ethernet/mellanox/mlxsw/pci.c