From patchwork Tue Jul 16 13:46:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerin Jacob Kollanukkaran X-Patchwork-Id: 56505 X-Patchwork-Delegate: thomas@monjalon.net 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 3BE791B950; Tue, 16 Jul 2019 15:46:17 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 64E1F1B94F for ; Tue, 16 Jul 2019 15:46:16 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x6GDk6qD031848; Tue, 16 Jul 2019 06:46:15 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0818; bh=sY/iaAuAJP7jAkGBIrPNM2XsxVCYInyfr3RXJkkX6rI=; b=kQWrg84X4rFZPZ+Mgcuo6IM+As+Q+OKClJZM6i/KgWiE4vmTlNmAJg9Xgf9/s42ArDec 0/l3mper2nSf7Xpng4WDhKZdL+6k0ebEYkAX3XZATqC8HF5OLIYEFYdm76e+7dgdApbP c8r6eDK9pr1wXxVloYQX8dv99S+HSmcI0Ww6pLwhgpsMu4EGYgQ7mw85h5WCdnlMp+Hp LEJTcMK3wI4ZQX9pVEteTk1+cd1pMKNeGud9VnXyvIZPmyZ853DCyZ/jMiXYQ4q0ou0u 1YRdFdCcG6fWhpOifWBVkEDz7vR4oYOSesYhS0UL9xx/+1o6r8sZ1MX6OyxnYix6lCJS vg== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0a-0016f401.pphosted.com with ESMTP id 2ts07vbf4v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 16 Jul 2019 06:46:15 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 16 Jul 2019 06:46:14 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Tue, 16 Jul 2019 06:46:14 -0700 Received: from jerin-lab.marvell.com (jerin-lab.marvell.com [10.28.34.14]) by maili.marvell.com (Postfix) with ESMTP id D74B93F703F; Tue, 16 Jul 2019 06:46:12 -0700 (PDT) From: To: CC: , , , Jerin Jacob Date: Tue, 16 Jul 2019 19:16:06 +0530 Message-ID: <20190716134609.40930-2-jerinj@marvell.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190716134609.40930-1-jerinj@marvell.com> References: <1562795329-16652-1-git-send-email-david.marchand@redhat.com> <20190716134609.40930-1-jerinj@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:5.22.84,1.0.8 definitions=2019-07-16_04:2019-07-16,2019-07-16 signatures=0 Subject: [dpdk-dev] [PATCH v2 1/4] Revert "bus/pci: add Mellanox kernel driver type" 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" From: David Marchand This reverts commit 0cb86518db57d35e0abc14d6703fad561a0310e2. The pci bus now reports DC when faced with a device bound to an unknown driver and, in such a case, the IOVA mode is selected against physical address availability. As a consequence, there is no reason for this special case for Mellanox drivers. Fixes: 703458e19c16 ("bus/pci: consider only usable devices for IOVA mode") Signed-off-by: David Marchand Reviewed-by: Jerin Jacob --- drivers/bus/pci/linux/pci.c | 8 -------- lib/librte_eal/common/include/rte_dev.h | 1 - 2 files changed, 9 deletions(-) diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c index 33c8ea7e9..b12f10af5 100644 --- a/drivers/bus/pci/linux/pci.c +++ b/drivers/bus/pci/linux/pci.c @@ -329,9 +329,6 @@ pci_scan_one(const char *dirname, const struct rte_pci_addr *addr) dev->kdrv = RTE_KDRV_IGB_UIO; else if (!strcmp(driver, "uio_pci_generic")) dev->kdrv = RTE_KDRV_UIO_GENERIC; - else if (!strcmp(driver, "mlx4_core") || - !strcmp(driver, "mlx5_core")) - dev->kdrv = RTE_KDRV_NIC_MLX; else dev->kdrv = RTE_KDRV_UNKNOWN; } else @@ -591,11 +588,6 @@ pci_device_iova_mode(const struct rte_pci_driver *pdrv, break; } - case RTE_KDRV_NIC_MLX: - if ((pdrv->drv_flags & RTE_PCI_DRV_IOVA_AS_VA) == 0) - iova_mode = RTE_IOVA_PA; - break; - case RTE_KDRV_IGB_UIO: case RTE_KDRV_UIO_GENERIC: iova_mode = RTE_IOVA_PA; diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h index 94829f6e4..c25e09e3d 100644 --- a/lib/librte_eal/common/include/rte_dev.h +++ b/lib/librte_eal/common/include/rte_dev.h @@ -63,7 +63,6 @@ enum rte_kernel_driver { RTE_KDRV_VFIO, RTE_KDRV_UIO_GENERIC, RTE_KDRV_NIC_UIO, - RTE_KDRV_NIC_MLX, RTE_KDRV_NONE, };