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=-5.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, 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 A762DC4742C for ; Mon, 16 Nov 2020 15:47:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 67353207BC for ; Mon, 16 Nov 2020 15:47:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="DtdiSme0" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731035AbgKPPqp (ORCPT ); Mon, 16 Nov 2020 10:46:45 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:50180 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730348AbgKPPqo (ORCPT ); Mon, 16 Nov 2020 10:46:44 -0500 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 0AGFkOVu104239; Mon, 16 Nov 2020 09:46:24 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1605541584; bh=o5t+uCx7ItW5nQ8KW3HQTL7wK+HIkVDh+GCe1ihPz3c=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=DtdiSme0BqH/yuobIwTbIKCjyIO6bx5eU05TvxHWl3p6amKLx5ifo0vnGrTFhC9AD 5AAbAi+6yBVh8xleMDNipZtJljAODjGz+cuJq1EgOd2PMEgTaj0W1164Fit+yRph3M gD1VuUd3SDpYjYr6LfoUk2Dkom7KhSrf5be1fluc= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 0AGFkObf046972 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 16 Nov 2020 09:46:24 -0600 Received: from DFLE105.ent.ti.com (10.64.6.26) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Mon, 16 Nov 2020 09:46:24 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Mon, 16 Nov 2020 09:46:24 -0600 Received: from [10.250.235.36] (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 0AGFkHxS052842; Mon, 16 Nov 2020 09:46:18 -0600 Subject: Re: [PATCH v7 15/18] NTB: Add support for EPF PCI-Express Non-Transparent Bridge To: Arnd Bergmann CC: Sherry Sun , "bhelgaas@google.com" , Jonathan Corbet , "lorenzo.pieralisi@arm.com" , "arnd@arndb.de" , "jdmason@kudzu.us" , "dave.jiang@intel.com" , "allenbh@gmail.com" , "tjoseph@cadence.com" , Rob Herring , "gregkh@linuxfoundation.org" , "linux-pci@vger.kernel.org" , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-ntb@googlegroups.com" References: <20200930153519.7282-16-kishon@ti.com> <30c8f7a1-baa5-1eb4-d2c2-9a13be896f0f@ti.com> <5a9115c8-322e-ffd4-6274-ae98c375b21d@ti.com> From: Kishon Vijay Abraham I Message-ID: Date: Mon, 16 Nov 2020 21:15:53 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Hi Arnd, On 16/11/20 9:07 pm, Arnd Bergmann wrote: > On Mon, Nov 16, 2020 at 6:19 AM Kishon Vijay Abraham I wrote: >> On 12/11/20 6:54 pm, Arnd Bergmann wrote: >>> >>> This looks very promising indeed, I need to read up on the whole >>> discussion there. I also see your slides at [1] that help do explain some >>> of it. I have one fundamental question that I can't figure out from >>> the description, maybe you can help me here: >>> >>> How is the configuration managed, taking the EP case as an >>> example? Your UseCase1 example sounds like the system that owns >>> the EP hardware is the one that turns the EP into a vhost device, >>> and creates a vhost-rpmsg device on top, while the RC side would >>> probe the pci-vhost and then detect a virtio-rpmsg device to talk to. >> >> That's correct. Slide no 9 in [1] should give the layering details. >> >>> Can it also do the opposite, so you end up with e.g. a virtio-net >>> device on the EP side and vhost-net on the RC? >> >> Unfortunately no. Again referring slide 9 in [1], we only have >> vhost-pci-epf on the EP side which only creates a "vhost_dev" to deal >> with vhost side of things. For doing the opposite, we'd need to create >> virtio-pci-epf for EP side that interacts with core virtio (and also the >> corresponding vhost back end on PCI host). > > Ok, I see. So I think this is the opposite of drivers/misc/mic and > the bluefield driver were using, so we would probably end up > needing both. > > Then again, I guess the NTB driver would give us the functionality > for free, if it shows a symmetric link? Right, NTB driver would need "pci_dev" on both sides of the link. But that would also mean we cannot use pci EP framework which actually uses "pci_epf". Thanks Kishon