mlxsw: spectrum_router: Add rif helper functions