Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1058232pxb; Thu, 5 Nov 2020 22:58:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJwyvrk345FzReEmTWWMUuZc2EFglica8BEJgNxQZX5+00yMUqgBBStLNyt8m07LHvqbJ1Pd X-Received: by 2002:a17:906:804:: with SMTP id e4mr662757ejd.420.1604645931124; Thu, 05 Nov 2020 22:58:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604645931; cv=none; d=google.com; s=arc-20160816; b=ftOcoXmyGdPyiQWq7MasDkXROmyBXx1VYzizqUOfWlYwBVVlPM3P4rSliq+q8rhE1Q 9pCAOeaulHXSZVEKrf62WVYr79dUzXQ0abaLkDj99inxWlkXYokpH5pRxRtSOCj0lKEa cMSLvIvlVhmgVisi4rvBMN3OW/aSz7tlUNYqWVA7bXmUtYK3/r4l6F+xofr3mzsCoMFN RJMAe1WuMxocWlXSWg8N5rb4FN6yhGoYCCs7bdw4TTuGpkMFUsWdfQwe0lY5Sthwe+BY ZenvT4WbxsJ3aRCkXl7o7T/gYd95LgJPzpv9N7yzJJwpqseb+0339MXqsy5vvBL6+wJv Ze+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=6+2Cm+2Iv7jGGFEavZO1G9DgfdSxW/TgpPOTOwHit1M=; b=vok+DEl0HapNZo3B86vYLmgZy//aDKalsAgluwWzpHc0fT4KjnU9G7YtDdO0dA+iVg k+/TFPu0IqoE7JELe1PJT6QjMfGRNv5P97kDoD8JXqd5UJ6XKwt13QWmPecTcFJJHGji CleTd5oWFvM9it3/Mb6veiNUvTkBgcxfC0cDLj813qgkz385G4le+R2ZD/ZG1fEvi8yg EiMlGY3x82aDPn+69HcV+wTqBIjbXjninl3i/767WD6L0BrhE+C8GBu01/obDd3jqC6n 4hGwtL8ZDt7BW55S01IcVIvDUO9yf2HZGwF3pS1SPxB95W+PWqNYw4DHkPeKq8IIG/0A tdew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kuiVH9hQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u18si317337edf.376.2020.11.05.22.58.28; Thu, 05 Nov 2020 22:58:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kuiVH9hQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726198AbgKFG4e (ORCPT + 99 others); Fri, 6 Nov 2020 01:56:34 -0500 Received: from mail.kernel.org ([198.145.29.99]:40512 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725828AbgKFG4d (ORCPT ); Fri, 6 Nov 2020 01:56:33 -0500 Received: from localhost (searspoint.nvidia.com [216.228.112.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 83A17206F4; Fri, 6 Nov 2020 06:56:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604645793; bh=yRhE6XR0cLSyZZkXEIf4EKqkW1OuHyv4bdZKoioXVrw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kuiVH9hQopx87bfdsAx2gbKmFgqYBDw23j1qfXnRfX10trVIjqzi1XQuIsXTGLE9G 1DTngfIQUa/4q9EbToBgKnayZOqY86jTsC5P77eqHjqujTvlcdN+c69Yid3YbD3VC5 tWou/zcOf1hZwMT8Gp8NSxGCgRn/4TGKZrD2daKc= Date: Fri, 6 Nov 2020 08:56:29 +0200 From: Leon Romanovsky To: Jason Gunthorpe , Saeed Mahameed Cc: Doug Ledford , gregkh , Jakub Kicinski , Jason Wang , linux-rdma@vger.kernel.org, "Michael S. Tsirkin" , netdev@vger.kernel.org, Parav Pandit , Roi Dayan , virtualization@lists.linux-foundation.org, alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, "David S . Miller" , ranjani.sridharan@linux.intel.com, pierre-louis.bossart@linux.intel.com, fred.oh@linux.intel.com, shiraz.saleem@intel.com, dan.j.williams@intel.com, kiran.patil@intel.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH mlx5-next v1 05/11] net/mlx5: Register mlx5 devices to auxiliary virtual bus Message-ID: <20201106065629.GD5475@unreal> References: <20201101201542.2027568-1-leon@kernel.org> <20201101201542.2027568-6-leon@kernel.org> <20201105210948.GS2620339@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201105210948.GS2620339@nvidia.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 05, 2020 at 05:09:48PM -0400, Jason Gunthorpe wrote: > On Thu, Nov 05, 2020 at 12:59:20PM -0800, Saeed Mahameed wrote: > > > 2. you can always load a driver without its underlying device existed. > > for example, you can load a pci device driver/module and it will load > > and wait for pci devices to pop up, the subsysetem infrastructure will > > match between drivers and devices and probe them. > > Yes, this works fine with this design > > > struct aux_driver mlx5_vpda_aux_driver { > > > > .name = "vdpa", > > /* match this driver with mlx5_core devices */ > > .id_table = {"mlx5_core"}, > > .ops { > > /* called before probe on actual aux mlx5_core device */ > > .is_supported(struct aux_device); > > This means module auto loading is impossible, we can't tell to load > the module until we load the module to call the is_supported code .. Right, and if we can, it will be violation of everything we know in driver model, because the call "is_supported" will need to be called for every registered driver without any relation to existed devices. And mlx5_rescan_drivers() came as a need to overcome LAG and eswitch craziness in everything related to their reprobe flows. Once they will be changed to work like normal drivers, we will be able to simplify it. So let's talk offline to see how can we improve mlx5_core even more after this series is merged. Thanks > > Jason