]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_fid: Save 'fid_offset' as part of FID structure
authorAmit Cohen <amcohen@nvidia.com>
Tue, 21 Jun 2022 08:33:43 +0000 (11:33 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 22 Jun 2022 11:56:58 +0000 (12:56 +0100)
commit945d25024e3d356b70ca3d0c0e432c0a418dc050
treecd727249327bda24b720bdf9d4358257725258e6
parent2c431326815eef6484549c1c43ba53397f3b97e2
mlxsw: spectrum_fid: Save 'fid_offset' as part of FID structure

SFMR register contains a 'fid_offset' field which is used when flooding
tables of type FID offset are used.

Currently, the driver sets this field to zero, as flooding tables of type
FID are used.

Using unified bridge model, the driver will use FID offset flooding
tables. As preparation, add 'fid_offset' to 'struct mlxsw_sp_fid'. Then,
use this field instead of passing zero to the function that configures
SFMR.

Set the new field as part of 'ops->setup()', for that, implement this
function for dummy FID and rFID.

Signed-off-by: Amit Cohen <amcohen@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c