Received: by 10.213.65.68 with SMTP id h4csp171866imn; Tue, 3 Apr 2018 18:07:20 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/t5Os8PNKDICSISTogsc4x6odMxF9tFAZpWqTmPffb3lrO+rsKjVlpVsMPdV2u1s+SF074 X-Received: by 10.98.204.12 with SMTP id a12mr12276196pfg.3.1522804040769; Tue, 03 Apr 2018 18:07:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522804040; cv=none; d=google.com; s=arc-20160816; b=lpBqTnUNGvYx+VPIuL2vzqxyFoOswNifmgXwD8C8QA72/GmI2HW04X9fKFeFzPOvBG Bx31XLXYsljb+aXartbuz0NS58AEc/sZPOa7ILKsbs4+Z1d9ch1oyj3SfX1o7rTWbWYh TUXXGJaGT4odynbUQSJWHULKCofA755Dv66axo+toXofb+olhSUCGoP1R1jzKKHSkzDH hm22HeT0lVlymGu6N+vKbFRLASsXsXkaNYa4k7KbUkBnfE4ICEFgguAQHEE/ePA+6qem IzB4inZ9nBhQez8wMNIcseek2rKvIKOssf5lLqdKopXYt01+Xb+DaCO7uYb+IdmqJZi9 sYJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=9vhrbLIWv1rf4YhjG573k+9q49uSVhs+71nTbMG1I0c=; b=JjhxGIgXlYbsJ8qS2qX6y/uxfsdnlszTXXNwQolhm+smbo/rZc0Gi3DgFmGcjMQS16 F+eGPEU6Xyy73fZSpO06WiUef13bYdqaoBTUGiJ70l6jjRDxPlQhmnZAUyk8UDGFbQxo eXw4aZkfwBfS17lj5LJ5X2elJMALgUMFAG9ZTPJvW+AV4T74tTMCRKoxEHdtT90uWUza 05lsCIB/2j32ACOGy2ccHb8+MbTxnmb3bJLpxI5BPjJ8nBFu+GnMfydmQ0Ie6Oa/DzKE wY7mZUUE1+RGicoPFdX7zNgsDKzcAfUz2ftKZ/pZ3qrQTzWL/0HC9eCuSuftNLuIoO7z 1NuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=6MDKipMy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b14si2854444pge.252.2018.04.03.18.07.06; Tue, 03 Apr 2018 18:07:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=6MDKipMy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754848AbeDDBF4 (ORCPT + 99 others); Tue, 3 Apr 2018 21:05:56 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:50507 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753425AbeDDBFz (ORCPT ); Tue, 3 Apr 2018 21:05:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=9vhrbLIWv1rf4YhjG573k+9q49uSVhs+71nTbMG1I0c=; b=6MDKipMyv/t8+W1hw8UBag2W8fcmkTPGuSiEJTO8BlSS2GFZ7h2pk1pVFw+f5KtwA7ITMThJ/B244oLpT7a+YH16jJuy0xcGq2rz2HHErQa4J5q4JwMtqX67R+3BSxWx/cwlOWoXZgucZdVgTNb9cD/EQcRDNLFEBe0eeR6af0s=; Received: from andrew by vps0.lunn.ch with local (Exim 4.84_2) (envelope-from ) id 1f3Ws1-0003Vo-Ql; Wed, 04 Apr 2018 03:05:49 +0200 Date: Wed, 4 Apr 2018 03:05:49 +0200 From: Andrew Lunn To: Stuart Yoder Cc: Arnd Bergmann , Ioana Ciornei , gregkh , Laurentiu Tudor , Linux Kernel Mailing List , Ruxandra Ioana Ciocoi Radulescu , Razvan Stefanescu , Roy Pledge , Networking Subject: Re: [PATCH v3 2/4] bus: fsl-mc: add restool userspace support Message-ID: <20180404010549.GA12443@lunn.ch> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Suppose you want to create and assign a network interface to a KVM > virtual machine, you would do something like the following using > a user space tool like restool: > -create a new (empty) dprc object > -create a new dpni and assign it to the dprc > -create a new dpio and assign it to the dprc > -create a new dpbp and assign it to the dprc > -create a new dpmcp and assign it to the dprc > -create a new dpmac and assign it to the dprc > -connect the dpni to the dpmac Hi Stuart It this connecting to a physical port at the bottom? If so, i would expect that when you probe the device you just create all these for each physical port. You then just need to map one of them into the KVM, in the same way you map one PCI device into a KVM. If these are virtual devices, VF devices you would normally do echo 4 > /sys/class/net//device/sriov_numvfs on the physical device to create virtual devices. > The fsl-mc bus and DPAA2 is very NXP-specific, so there doesn't > seem to be anything that can be made generic here to provide > more common benefit. Which is why you should try to avoid all of this. The user knows how to use standard linux commands and concepts. They don't want to have to learn the inside plumbing of your hardware. Andrew