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.4 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,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 E66B3C432C0 for ; Tue, 19 Nov 2019 16:46:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B9706208CC for ; Tue, 19 Nov 2019 16:46:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="Lp72rfCT" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728489AbfKSQqf (ORCPT ); Tue, 19 Nov 2019 11:46:35 -0500 Received: from mail-qk1-f194.google.com ([209.85.222.194]:44560 "EHLO mail-qk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728483AbfKSQqe (ORCPT ); Tue, 19 Nov 2019 11:46:34 -0500 Received: by mail-qk1-f194.google.com with SMTP id m16so18388803qki.11 for ; Tue, 19 Nov 2019 08:46:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=9PNpRcE0uVma5xN3FBSJmZpM2jm61gwUGX17V4ua8zI=; b=Lp72rfCT8FdLdR64JLtInWUYtmv7ZHvZLVuui7mNblNTGtWik+q1hUP3PiVgPdRFYL 9CyvmdkvCU2A1z7InZAJqbf+r1tdacBtLJcBY2laBa+9HiTlQ09CBsZbcdCC8Up6fBp7 avVI5z1BzMRJTmanbeye3rAlZIrbwk4LsLRlCgbZ7jYjIaz3GmiGMJmKfdoIK6aQXN32 JXuSilzZKo4HX8Ijk/IrPk8PZ6EYD3uvsi2/sl9LS5G+vQWjWtQ/nbDlaItMPGyhKHQe kD3qqOSk1ZIZ25cuLIVhi/r31iZcklXQStlSKZ9fiSpCHflF0l3BMsWu+W3KwJtQJhGc 9q+w== 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:references :mime-version:content-disposition:in-reply-to:user-agent; bh=9PNpRcE0uVma5xN3FBSJmZpM2jm61gwUGX17V4ua8zI=; b=uCBXmNnwyBpZk6Caci6Yn6JsLyBusb3eqCQ++Of34L3UNkPTnaJvgS2twGcYDK/zdG lE9H6Uup7jD8EtLjHeKTNtjCznjcjBDTs/Yeq9nxOUMATpygQ4FWhYbB4rNRUpCAfrrO g6w/xAQDerUy+iD5epBLmO8drfh0s8+WWk1IoJw4vPh5MwbOjcxc5vIEPv39+Rb16Dxd ew563Mk5g1N//zCA4gTBJhAuM3xtbwYXsIhjf7fCz0CuMWOLW5MNK9l7HyiAYtAgBcj9 rUjxxlDWTZMrefuZsseyvslSw+7ZY9BDqYEURi2ZOP5DsHjvQ+ivn2o3WzpwuKNPBCC9 qgAw== X-Gm-Message-State: APjAAAVnhy+bw3gHnQ1+mdVbtQ2u+An8JE/Doauk3jpMCWiGBDShV0zW vw7K9kee/4LtAhe375nM0Vjki5B+z1k= X-Google-Smtp-Source: APXvYqxxFVHS62/ZKoFpMFnPT6ZCy67+DTYrT/ZDPYcHXXjB4ULX6v17osKUteav+OwwEDyAF2NSdA== X-Received: by 2002:a05:620a:149a:: with SMTP id w26mr29908593qkj.361.1574181993809; Tue, 19 Nov 2019 08:46:33 -0800 (PST) Received: from ziepe.ca (hlfxns017vw-142-162-113-180.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.162.113.180]) by smtp.gmail.com with ESMTPSA id q16sm10356002qkm.27.2019.11.19.08.46.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Nov 2019 08:46:33 -0800 (PST) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1iX6e8-0001TG-KD; Tue, 19 Nov 2019 12:46:32 -0400 Date: Tue, 19 Nov 2019 12:46:32 -0400 From: Jason Gunthorpe To: Jason Wang Cc: Parav Pandit , Jeff Kirsher , "davem@davemloft.net" , "gregkh@linuxfoundation.org" , Dave Ertman , "netdev@vger.kernel.org" , "linux-rdma@vger.kernel.org" , "nhorman@redhat.com" , "sassmann@redhat.com" , Kiran Patil , "Michael S. Tsirkin" , Alex Williamson , "Bie, Tiwei" Subject: Re: [net-next v2 1/1] virtual-bus: Implementation of Virtual Bus Message-ID: <20191119164632.GA4991@ziepe.ca> References: <20191115223355.1277139-1-jeffrey.t.kirsher@intel.com> <13946106-dab2-6bbe-df79-ca6dfdeb4c51@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org On Tue, Nov 19, 2019 at 03:37:03PM +0800, Jason Wang wrote: > > Jiri, Jason, me think that even virtio accelerated devices will need eswitch support. And hence, life cycling virtio accelerated devices via devlink makes a lot of sense to us. > > This way user has single tool to choose what type of device he want to use (similar to ip link add link type). > > So sub function flavour will be something like (virtio or sf). > > Networking is only one of the types that is supported in virtio-mdev. The > codes are generic enough to support any kind of virtio device (block, scsi, > crypto etc). Sysfs is less flexible but type independent. I agree that > devlink is standard and feature richer but still network specific. It's > probably hard to add devlink to other type of physical drivers. I'm thinking > whether it's possible to combine syfs and devlink: e.g the mdev is available > only after the sub fuction is created and fully configured by devlink. The driver providing the virtio should really be in control of the life cycle policy. For net related virtio that is clearly devlink. Even for block we may find that network storage providers (ie some HW accelerated virtio-blk-over-ethernet) will want to use devlink to create a combination ethernet and accelerated virtio-block widget. This is why the guid life cycle stuff should be in a library that can be used by the drivers that need it (assuming all drivers don't just use devlink as Parav proposes) As always, this is all very hard to tell without actually seeing real accelerated drivers implement this. Your patch series might be a bit premature in this regard. Jason