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=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 53C3FC17443 for ; Sat, 9 Nov 2019 17:41:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 268D22075C for ; Sat, 9 Nov 2019 17:41:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=netronome-com.20150623.gappssmtp.com header.i=@netronome-com.20150623.gappssmtp.com header.b="Ux66y2/K" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726583AbfKIRlI (ORCPT ); Sat, 9 Nov 2019 12:41:08 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:43230 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726496AbfKIRlI (ORCPT ); Sat, 9 Nov 2019 12:41:08 -0500 Received: by mail-pf1-f195.google.com with SMTP id 3so7278362pfb.10 for ; Sat, 09 Nov 2019 09:41:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :organization:mime-version:content-transfer-encoding; bh=2B7miXvo12sd3AwR/N24hvrji1TnW/1jP59Zv1D2zxA=; b=Ux66y2/Kev7fAowQYcNDFqBF2oMucxESjkkRfo8IKup+pQkx6c41HWBsZj9GcF/XH7 9q5bddJ0Ib4aWwuzqXvZ/f6ExZS0BhSgfZfP25ahtYi6cRFgd6bNKGUNcmMNHudNagcC gCsZz3t6Mq+E1k40G+tbKVjUsRtLsUqFwOo01ugae2GCJvy2GLhJrtoc20el2oh7SbBf ROYWJC/rPRLGrqeXE6yeGN7xdj1TF4KXEbxh+FAYZYVgj9tCuD0GO2qMFAKfYbcAHD09 n6ptYL86QvSyY/z14h/xrMQJ/T5NEtw6+1My7DBq0+zYNnCHlHm/tL1osxRC9TA7a9Sc ltcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:organization:mime-version:content-transfer-encoding; bh=2B7miXvo12sd3AwR/N24hvrji1TnW/1jP59Zv1D2zxA=; b=PECECh9ViWVlO3mL3/NBhtVXhdZQbjVyeYzAhsOgOMEf1a++Dm8wr706H1gnOckIyy /s++y2OQYQtkfqdALbj94lkeMczgNzLCRz0iMMAwNEI+lomvBxzxJ/GnnFDgTYR6MS8t 8/GH9lCD2fgrIzKWm301KzCRAfXN+7WlX7mquqapxN0U008Q+1GQibGBhQt2UdXGCkDq MNEG4AgtEXeTNVjTt7/hytvhhXQAx6yhu/zEHVaovG1XxpAkc5As1LdhHbE1klNdoCZD CUlRYAk5uAVuJTin1krJkQLbmbIh2SmADbKoJFdkk8EFau/HLXY+sgoUhOopVp749196 mKMg== X-Gm-Message-State: APjAAAWF4J/dsbUBJQeDKP2KcCUsTar9j4u78Igj7AR7qkqN8hpMhCgV 2f52CSJa+er18YcOynvHhkCHkg== X-Google-Smtp-Source: APXvYqzxYgwMmVIq1JfKtIHriDl97HY1zcdcpAYzr8weQ2+HF6xR/h1VetUuPsLmf6vJjuss1CYESw== X-Received: by 2002:a63:3205:: with SMTP id y5mr19364349pgy.42.1573321267604; Sat, 09 Nov 2019 09:41:07 -0800 (PST) Received: from cakuba (c-73-202-202-92.hsd1.ca.comcast.net. [73.202.202.92]) by smtp.gmail.com with ESMTPSA id a23sm5103400pjv.26.2019.11.09.09.41.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Nov 2019 09:41:07 -0800 (PST) Date: Sat, 9 Nov 2019 09:41:03 -0800 From: Jakub Kicinski To: Jason Gunthorpe Cc: Parav Pandit , Alex Williamson , Jiri Pirko , David M , "gregkh@linuxfoundation.org" , "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 , "Jason Wang (jasowang@redhat.com)" Subject: Re: [PATCH net-next 00/19] Mellanox, mlx5 sub function support Message-ID: <20191109094103.739033a3@cakuba> In-Reply-To: <20191109005708.GC31761@ziepe.ca> References: <20191107153234.0d735c1f@cakuba.netronome.com> <20191108121233.GJ6990@nanopsycho> <20191108144054.GC10956@ziepe.ca> <20191108111238.578f44f1@cakuba> <20191108201253.GE10956@ziepe.ca> <20191108133435.6dcc80bd@x1.home> <20191108210545.GG10956@ziepe.ca> <20191108145210.7ad6351c@x1.home> <20191109005708.GC31761@ziepe.ca> Organization: Netronome Systems, Ltd. MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Fri, 8 Nov 2019 20:57:08 -0400, Jason Gunthorpe wrote: > On Fri, Nov 08, 2019 at 10:48:31PM +0000, Parav Pandit wrote: > > We should be creating 3 different buses, instead of mdev bus being de-multiplexer of that? > > > > Hence, depending the device flavour specified, create such device on right bus? > > > > For example, > > $ devlink create subdev pci/0000:05:00.0 flavour virtio name foo subdev_id 1 > > $ devlink create subdev pci/0000:05:00.0 flavour mdev subdev_id 2 > > $ devlink create subdev pci/0000:05:00.0 flavour mlx5 id 1 subdev_id 3 > > I like the idea of specifying what kind of interface you want at sub > device creation time. It fits the driver model pretty well and doesn't > require abusing the vfio mdev for binding to a netdev driver. Aren't the HW resources spun out in all three cases exactly identical? IMHO creation of sub device should only define which HW resources are provisioned/relegated. Specifying a driver when recreating a device seems a little backwards.