From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B0C16C43331 for ; Sat, 9 Nov 2019 08:47:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7C1CA214E0 for ; Sat, 9 Nov 2019 08:47:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573289226; bh=rlfVeh3hFAuUqU1iwmWMP9/hCo+EzMqimLNvLzKizuI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=oawBDjrK6B12gcFuVNv6XDY4pppwaQ4GcwxVQXXDMMPsc1VFTLuevbz5gJrGPGC8H O9K7epVRZFYJ+vYeYybZH0on71sqJRuxE4qWgQ7XoOU1tdmwsh9JoF4lj/h4WOLs1e hOOqkigIUPK9YOSoougrPjvLDBNanAyXJBRjqovQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726275AbfKIIrF (ORCPT ); Sat, 9 Nov 2019 03:47:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:47934 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726136AbfKIIrF (ORCPT ); Sat, 9 Nov 2019 03:47:05 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 976A4214E0; Sat, 9 Nov 2019 08:47:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573289222; bh=rlfVeh3hFAuUqU1iwmWMP9/hCo+EzMqimLNvLzKizuI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qRtEOwuVMZJ7p3kkY8QF7AbYlsidmiKDkVxKL9yeTjNE7m0NsL+o6xSCyO/uiYre8 lA71Ubq7LLTVyW+fN44qPHeWaLMROlxthzTVqvVQkyMxzE9Er3GeDJKjSHhJIMO+4x mN2v09hOWO7k0usvWF1iGmZ53fbdQxal9tX1zmQ4= Date: Sat, 9 Nov 2019 09:46:59 +0100 From: "gregkh@linuxfoundation.org" To: Jason Gunthorpe Cc: Jakub Kicinski , Parav Pandit , Jiri Pirko , David M , "alex.williamson@redhat.com" , "davem@davemloft.net" , "kvm@vger.kernel.org" , "netdev@vger.kernel.org" , Saeed Mahameed , "kwankhede@nvidia.com" , "leon@kernel.org" , "cohuck@redhat.com" , Jiri Pirko , "linux-rdma@vger.kernel.org" , Or Gerlitz Subject: Re: [PATCH net-next 00/19] Mellanox, mlx5 sub function support Message-ID: <20191109084659.GB1289838@kroah.com> References: <20191107160448.20962-1-parav@mellanox.com> <20191107153234.0d735c1f@cakuba.netronome.com> <20191108121233.GJ6990@nanopsycho> <20191108144054.GC10956@ziepe.ca> <20191108111238.578f44f1@cakuba> <20191108201253.GE10956@ziepe.ca> <20191108134559.42fbceff@cakuba> <20191109004426.GB31761@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191109004426.GB31761@ziepe.ca> User-Agent: Mutt/1.12.2 (2019-09-21) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Fri, Nov 08, 2019 at 08:44:26PM -0400, Jason Gunthorpe wrote: > There has been some lack of clarity on what the ?? should be. People > have proposed platform and MFD, and those seem to be no-goes. So, it > looks like ?? will be a mlx5_driver on a mlx5_bus, and Intel will use > an ice_driver on a ice_bus, ditto for cxgb4, if I understand Greg's > guidance. Yes, that is the only way it can work because you really are just sharing a single PCI device in a vendor-specific way, and they all need to get along with each one properly for that vendor-specific way. So each vendor needs its own "bus" to be able to work out things properly, I doubt you can make this more generic than that easily. > Though I'm wondering if we should have a 'multi_subsystem_device' that > was really just about passing a 'void *core_handle' from the 'core' > (ie the bus) to the driver (ie RDMA, netdev, etc). Ick, no. > It seems weakly defined, but also exactly what every driver doing this > needs.. It is basically what this series is abusing mdev to accomplish. What is so hard about writing a bus? Last I tried it was just a few hundred lines of code, if that. I know it's not the easiest in places, but we have loads of examples to crib from. If you have problems/questions, just ask! Or, worst case, you just do what I asked in this thread somewhere, and write a "virtual bus" where you just create devices and bind them to the driver before registering and away you go. No auto-loading needed (or possible), but then you have a generic layer that everyone can use if they want to (but you loose some functionality at the expense of generic code.) Are these constant long email threads a way that people are just trying to get me to do this work for them? Because if it is, it's working... thanks, greg k-h