Skip to content

Commit f7ebb40

Browse files
pmachatakuba-moo
authored andcommitted
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]>
1 parent 27851df commit f7ebb40

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8419,6 +8419,9 @@ mlxsw_sp_rif_create(struct mlxsw_sp *mlxsw_sp,
84198419
rif->ops = ops;
84208420
rif->rif_entries = rif_entries;
84218421

8422+
if (ops->setup)
8423+
ops->setup(rif, params);
8424+
84228425
if (ops->fid_get) {
84238426
fid = ops->fid_get(rif, params, extack);
84248427
if (IS_ERR(fid)) {
@@ -8428,9 +8431,6 @@ mlxsw_sp_rif_create(struct mlxsw_sp *mlxsw_sp,
84288431
rif->fid = fid;
84298432
}
84308433

8431-
if (ops->setup)
8432-
ops->setup(rif, params);
8433-
84348434
err = ops->configure(rif, extack);
84358435
if (err)
84368436
goto err_configure;

0 commit comments

Comments
 (0)