From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49]) by dpdk.org (Postfix) with ESMTP id EC9BB8D9F for ; Wed, 13 Jan 2016 15:44:17 +0100 (CET) Received: by mail-pa0-f49.google.com with SMTP id cy9so359503325pac.0 for ; Wed, 13 Jan 2016 06:44:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mvista-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=gIoEm9eNrzPX1XiRvT28GF4QiolRxNC2eSPq6hEhfpo=; b=oPy2txv1ZqSEJ0DZpdmFQjeaisona3W2XmyqOixH+kHp/ymRDJ6LjHfSpL8JREpDZ4 slQFUhw5IBh/+YUpCZFxd0fmVQ2M1jn6l1UkACwyxW3YKWxjuNBi6/wWcMsBq9a5m6wS uBE6Cbm3AEMnbZptCq+hloG9cTGZYDPri/eoSu3DHWAfif5PSHT+DoentRQMvdw8UwSP tCbSal7Qh4rHbA+GBO4rMGbdZKJ6wgsP3+Hnsl6YUrFaRCUvmJS2L1CZaKVTyCHOnO6R ZjnNbKQPmCIQ76V5jheFtYryfYbsl7JN6uC4P48CC1w87PRWoJ99/LbruzpMRzpdCgnc zFfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=gIoEm9eNrzPX1XiRvT28GF4QiolRxNC2eSPq6hEhfpo=; b=kK9DEEbznAha+RFJlZQw7F9RSwVePgZIua+uok6nlnZq4Mmiw/ME02hdY87xIKdnlR WXdgksYZT/TEROGmyQQ12+DAl9yxVjoQGKkDImvkB7O7KAy0mQCfIQW8bkAB4pjfkZAb eUM/9lFdAEcxBrbs8MW7A2Kh13ZPZMAiau8u9KMhUYPhhJ90/HHatOsYSpkNbH30h/Ay rQR6Urn5vgiM4im4HapOnDNESrfAHOMYrhijJWwV7rN2vCw37OVDNyPo7EE8gMzeDblU U7j+aqf+BcsD5SzLKMgPxtyDVWw6NrXsSayf3BRgHyPkqO4PdnsVY8qPk8sVvP2l02e5 Tg7w== X-Gm-Message-State: ALoCoQkYBPgAlvnHl23W22ZzfOcLj54gwITWG8c9qaWxjPxDj2b7Ozk2V7m7cfo4deCZMnyeVsRRPV9s9a5y/Uf5hN+8EAykTuGp7dPDRQrLiT+rGpdfFMA= MIME-Version: 1.0 X-Received: by 10.66.163.231 with SMTP id yl7mr192377207pab.141.1452696257159; Wed, 13 Jan 2016 06:44:17 -0800 (PST) Received: by 10.66.196.81 with HTTP; Wed, 13 Jan 2016 06:44:17 -0800 (PST) In-Reply-To: <20160112090543.GS26062@yliu-dev.sh.intel.com> References: <1452581944-24838-1-git-send-email-yuanhan.liu@linux.intel.com> <1452581944-24838-7-git-send-email-yuanhan.liu@linux.intel.com> <20160112084043.GR26062@yliu-dev.sh.intel.com> <20160112090543.GS26062@yliu-dev.sh.intel.com> Date: Wed, 13 Jan 2016 20:14:17 +0530 Message-ID: From: Santosh Shukla To: Yuanhan Liu Content-Type: text/plain; charset=UTF-8 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v2 6/7] eal: pci: export pci_map_device X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2016 14:44:18 -0000 On Tue, Jan 12, 2016 at 2:35 PM, Yuanhan Liu wrote: > On Tue, Jan 12, 2016 at 04:40:43PM +0800, Yuanhan Liu wrote: >> On Tue, Jan 12, 2016 at 09:31:05AM +0100, David Marchand wrote: >> > On Tue, Jan 12, 2016 at 7:59 AM, Yuanhan Liu >> > wrote: >> > >> > Normally we could set RTE_PCI_DRV_NEED_MAPPING flag so that eal will >> > invoke pci_map_device internally for us. From that point view, there >> > is no need to export pci_map_device. >> > >> > However, for virtio pmd driver, which is designed to work without >> > binding UIO (or something similar first), pci_map_device() will fail, >> > which ends up with virtio pmd driver being skipped. Therefore, we can >> > not set RTE_PCI_DRV_NEED_MAPPING blindly at virtio pmd driver. >> > >> > Therefore, this patch exports pci_map_device, and let virtio pmd >> > call it when necessary. >> > >> > >> > Well, if you introduce map function, I suppose, for hotplug, you would need >> > unmap. >> >> Good remind. Thanks. I will export pci_unmap_device as well. > > And here you go. > > --yliu > > -- >8 -- > From aa3d9d0fa827781d1563fd4c06ba04a8fafdc41c Mon Sep 17 00:00:00 2001 > From: Yuanhan Liu > Date: Mon, 11 Jan 2016 16:51:35 +0800 > Subject: [PATCH] eal: pci: export pci_[un]map_device > > Normally we could set RTE_PCI_DRV_NEED_MAPPING flag so that eal will > invoke pci_map_device internally for us. From that point view, there > is no need to export pci_map_device. > > However, for virtio pmd driver, which is designed to work without > binding UIO (or something similar first), pci_map_device() will fail, > which ends up with virtio pmd driver being skipped. Therefore, we can > not set RTE_PCI_DRV_NEED_MAPPING blindly at virtio pmd driver. > > Therefore, this patch exports pci_map_device, and let virtio pmd > call it when necessary. > > Signed-off-by: Yuanhan Liu > --- > v2: - export pci_unmap_device as well > > - Add few more comments about rte_eal_pci_map_device(). This patch tested for vfio-noIOMMU mode for arm64 platform. Tested-By: Santosh Shukla