mlxsw: spectrum_router: Call RIF setup before obtaining FID
For subport RIFs, the setup initializes, among other things, RIF port and LAG numbers. Those are important to determine where in the PGT the RIF FID will be stored. Therefore, call the RIF setup before fid_get. Signed-off-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Amit Cohen <amcohen@nvidia.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Link: https://lore.kernel.org/r/f24d8cad7e4748b8e8e0e16894ca6a20704dea32.1700503644.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
27851dfaa3
commit
f7ebb40237
@ -8419,6 +8419,9 @@ mlxsw_sp_rif_create(struct mlxsw_sp *mlxsw_sp,
|
||||
rif->ops = ops;
|
||||
rif->rif_entries = rif_entries;
|
||||
|
||||
if (ops->setup)
|
||||
ops->setup(rif, params);
|
||||
|
||||
if (ops->fid_get) {
|
||||
fid = ops->fid_get(rif, params, extack);
|
||||
if (IS_ERR(fid)) {
|
||||
@ -8428,9 +8431,6 @@ mlxsw_sp_rif_create(struct mlxsw_sp *mlxsw_sp,
|
||||
rif->fid = fid;
|
||||
}
|
||||
|
||||
if (ops->setup)
|
||||
ops->setup(rif, params);
|
||||
|
||||
err = ops->configure(rif, extack);
|
||||
if (err)
|
||||
goto err_configure;
|
||||
|
Loading…
x
Reference in New Issue
Block a user