From patchwork Fri Mar 8 09:28:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Traynor X-Patchwork-Id: 50991 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1F9C74C88; Fri, 8 Mar 2019 10:29:16 +0100 (CET) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 178B12C52; Fri, 8 Mar 2019 10:29:15 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3B38D306E29F; Fri, 8 Mar 2019 09:29:14 +0000 (UTC) Received: from rh.redhat.com (ovpn-117-96.ams2.redhat.com [10.36.117.96]) by smtp.corp.redhat.com (Postfix) with ESMTP id B86E6608C1; Fri, 8 Mar 2019 09:29:11 +0000 (UTC) From: Kevin Traynor To: rmody@marvell.com, shshaikh@marvell.com, dev@dpdk.org Cc: Kevin Traynor , stable@dpdk.org Date: Fri, 8 Mar 2019 09:28:55 +0000 Message-Id: <20190308092855.10942-1-ktraynor@redhat.com> In-Reply-To: <20190307183903.10779-1-ktraynor@redhat.com> References: <20190307183903.10779-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Fri, 08 Mar 2019 09:29:14 +0000 (UTC) Subject: [dpdk-dev] [PATCH v2] net/qede: support IOVA VA mode 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" Set RTE_PCI_DRV_IOVA_AS_VA in drv_flags. This allows initializing qede PMD as non-root also on Linux v4.x, where /proc/self/pagemap can't be acccessed without CAP_SYS_ADMIN privileges. The flag was introduced generically but not in pmds in commit: 815c7deaed2d ("pci: get IOMMU class on Linux") Cc: stable@dpdk.org Acked-by: Shahed Shaikh Acked-by: Rasesh Mody Signed-off-by: Kevin Traynor --- v2: fixed spacing error drivers/net/qede/qede_ethdev.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c index 518673dce..0b2f305e1 100644 --- a/drivers/net/qede/qede_ethdev.c +++ b/drivers/net/qede/qede_ethdev.c @@ -2736,5 +2736,6 @@ static int qedevf_eth_dev_pci_remove(struct rte_pci_device *pci_dev) static struct rte_pci_driver rte_qedevf_pmd = { .id_table = pci_id_qedevf_map, - .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC, + .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC | + RTE_PCI_DRV_IOVA_AS_VA, .probe = qedevf_eth_dev_pci_probe, .remove = qedevf_eth_dev_pci_remove, @@ -2755,5 +2756,6 @@ static int qede_eth_dev_pci_remove(struct rte_pci_device *pci_dev) static struct rte_pci_driver rte_qede_pmd = { .id_table = pci_id_qede_map, - .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC, + .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC | + RTE_PCI_DRV_IOVA_AS_VA, .probe = qede_eth_dev_pci_probe, .remove = qede_eth_dev_pci_remove,