mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
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 <[email protected]> Reviewed-by: Amit Cohen <[email protected]> Reviewed-by: Ido Schimmel <[email protected]> Link: https://lore.kernel.org/r/f24d8cad7e4748b8e8e0e16894ca6a20704dea32.1700503644.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski <[email protected]>
This commit is contained in:
1 parent
27851dfaa3
commit
f7ebb40237
1 file changed
+3
-3
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user