From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerin Jacob Subject: [PATCH v3 2/2] net/thunderx: manage PCI device mapping for SQS VFs Date: Fri, 9 Jun 2017 15:57:46 +0530 Message-ID: <20170609102746.13828-2-jerin.jacob@caviumnetworks.com> References: <20170608114414.8787-1-jerin.jacob@caviumnetworks.com> <20170609102746.13828-1-jerin.jacob@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain Cc: thomas@monjalon.net, ferruh.yigit@intel.com, Jerin Jacob To: dev@dpdk.org Return-path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0082.outbound.protection.outlook.com [104.47.42.82]) by dpdk.org (Postfix) with ESMTP id 0BA1C2BA1 for ; Fri, 9 Jun 2017 12:28:15 +0200 (CEST) In-Reply-To: <20170609102746.13828-1-jerin.jacob@caviumnetworks.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Since the commit e84ad157b7bc ("pci: unmap resources if probe fails"), EAL unmaps the PCI device if ethdev probe returns positive or negative value. nicvf thunderx PMD needs special treatment for Secondary queue set(SQS) PCIe VF devices, where, it expects to not unmap or free the memory without registering the ethdev subsystem. Enable the same behavior by using RTE_PCI_DRV_KEEP_MAPPED_RES PCI driver flag. Signed-off-by: Jerin Jacob --- drivers/net/thunderx/nicvf_ethdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c index 2152029b5..9d9f2c76e 100644 --- a/drivers/net/thunderx/nicvf_ethdev.c +++ b/drivers/net/thunderx/nicvf_ethdev.c @@ -2164,7 +2164,8 @@ static int nicvf_eth_pci_remove(struct rte_pci_device *pci_dev) static struct rte_pci_driver rte_nicvf_pmd = { .id_table = pci_id_nicvf_map, - .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC, + .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_KEEP_MAPPED_RES | + RTE_PCI_DRV_INTR_LSC, .probe = nicvf_eth_pci_probe, .remove = nicvf_eth_pci_remove, }; -- 2.13.1