From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 78679A2EFC for ; Tue, 15 Oct 2019 17:46:38 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 292721ED3E; Tue, 15 Oct 2019 17:46:38 +0200 (CEST) Received: from mail-pg1-f195.google.com (mail-pg1-f195.google.com [209.85.215.195]) by dpdk.org (Postfix) with ESMTP id 93A831ED15 for ; Tue, 15 Oct 2019 17:46:11 +0200 (CEST) Received: by mail-pg1-f195.google.com with SMTP id e10so8394124pgd.11 for ; Tue, 15 Oct 2019 08:46:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Q56zVYlMsai7ZO1AISTV9mKqh/5pYuMnTjOraBiqFzg=; b=iXMr/xByoAB97Vp0+IF9nMifRvBGW9bmaMuAKcfhis91aIi/alh4paPySdazu25OcV y7wAXZTKN2rS6iZBRRmrkMkRmizMJZruLGx/nX6/U1tBigwAuETZ6JDiwuHElBCRZAQ3 7u5ELt4rQ2ZhQCcrjT848i6i3ZK/R4ROUT8+ktTtHM+WOrOjclyrD6QPruJVQKj5sA5y Upb2/yZr59LgzKeTse0470fI/Wi75CDbiQ9mXXJxtfBuZb7qU1Ktnr6YNKgNOt3WK8lp xPTLbgMXnVbikeCZiEVb+iuOTujShOxYQkH6dEUOgHFplb90w+7wdoy3vH1fW/ie+vql 8FdA== 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:mime-version:content-transfer-encoding; bh=Q56zVYlMsai7ZO1AISTV9mKqh/5pYuMnTjOraBiqFzg=; b=Kq9iy9zA7n/gzKgRvivycTyH5up8Z40V1HIijXzeA9MnmzmeQPtgoIImUJcxNv2B9N HabYzKqr6E/AqoPc7UaFdXgwO4vQ9suf6a8O8GBpjZ9wRrrxV23Drs3afLJW7euQd0ZP Z6YG28U5QDSMJ4NLl3EMle/KfZTGLy7vaJpli30mXquo+HZ45lvUy4nfiHJzYfeLqqdx vszQP8qjdDoLT+rcMQBrqO0CAaz+Y+riPu8qK7ZhLQ3DM1sdPZ3cjWIS6lU+JviyWCVh 2zJIKDL+9c79z86u6MKZiSULYSg0+Ikb07wGAJiJTkUti6iSrFPR5vveCtZnKVu7ahXa 4WWw== X-Gm-Message-State: APjAAAWPcIFjcjmCPfHwG+isk1V5Ez9zttLLSFg+MgT/r1zOFuDsgOKq 9kkPi9cSurYhmdquZnK8X4yAlA== X-Google-Smtp-Source: APXvYqwKpAONhbiFiqeqGgOhjPO3CK+CkwJpVwfdx0dOPURaCA5D7q77GmZ6O86AjetP9S1X8cQzKQ== X-Received: by 2002:aa7:8249:: with SMTP id e9mr17718447pfn.118.1571154370657; Tue, 15 Oct 2019 08:46:10 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id r11sm20496504pgn.67.2019.10.15.08.46.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Oct 2019 08:46:10 -0700 (PDT) Date: Tue, 15 Oct 2019 08:46:03 -0700 From: Stephen Hemminger To: "Yigit, Ferruh" Cc: vattunuru@marvell.com, dev@dpdk.org, thomas@monjalon.net, jerinj@marvell.com, olivier.matz@6wind.com, ferruh.yigit@intel.com, anatoly.burakov@intel.com, arybchenko@solarflare.com, kirankumark@marvell.com Message-ID: <20191015084603.3b0f141f@hermes.lan> In-Reply-To: References: <20190729121313.30639-2-vattunuru@marvell.com> <20190816061252.17214-1-vattunuru@marvell.com> <20190816061252.17214-5-vattunuru@marvell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v10 4/5] kni: add IOVA=VA support in KNI module X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, 15 Oct 2019 16:43:08 +0100 "Yigit, Ferruh" wrote: > On 8/16/2019 7:12 AM, vattunuru@marvell.com wrote: > > From: Kiran Kumar K > > > > Patch adds support for kernel module to work in IOVA = VA mode, > > the idea is to get physical address from IOVA address using > > iommu_iova_to_phys API and later use phys_to_virt API to > > convert the physical address to kernel virtual address. > > > > When compared with IOVA = PA mode, there is no performance > > drop with this approach. > > > > This approach does not work with the kernel versions less > > than 4.4.0 because of API compatibility issues. > > > > Patch also updates these support details in KNI documentation. > > > > Signed-off-by: Kiran Kumar K > > Signed-off-by: Vamsi Attunuru > > <...> > > > @@ -348,15 +351,65 @@ kni_ioctl_create(struct net *net, uint32_t ioctl_num, > > strncpy(kni->name, dev_info.name, RTE_KNI_NAMESIZE); > > > > /* Translate user space info into kernel space info */ > > - kni->tx_q = phys_to_virt(dev_info.tx_phys); > > - kni->rx_q = phys_to_virt(dev_info.rx_phys); > > - kni->alloc_q = phys_to_virt(dev_info.alloc_phys); > > - kni->free_q = phys_to_virt(dev_info.free_phys); > > - > > - kni->req_q = phys_to_virt(dev_info.req_phys); > > - kni->resp_q = phys_to_virt(dev_info.resp_phys); > > - kni->sync_va = dev_info.sync_va; > > - kni->sync_kva = phys_to_virt(dev_info.sync_phys); > > + if (dev_info.iova_mode) { > > +#ifdef HAVE_IOVA_AS_VA_SUPPORT > > + pci = pci_get_device(dev_info.vendor_id, > > + dev_info.device_id, NULL); > > + if (pci == NULL) { > > + pr_err("pci dev does not exist\n"); > > + return -ENODEV; > > + } > > If there is no PCI device KNI should still work. Right now it is possible to use KNI with netvsc PMD on Hyper-V/Azure. With this patch that won't be possible.