From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0079.outbound.protection.outlook.com [104.47.37.79]) by dpdk.org (Postfix) with ESMTP id 1FF437CB8 for ; Thu, 1 Jun 2017 15:05:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=0uzw0NPtMXGih5nrTFDu5rS4l0JS4/dPk/gPMK3u/Bc=; b=GJiYoOq2FwEw9RVbaqENjKmJKl4TRIqGurhptONaMOgRDMe0uBhwgVi0X7X71ZBYwyIzci7RYknL7/x/VWv5V6UHIAfx17HHkeW2HAI1bAjkF3tAX/Xil/PppVrNQVmLhgzhA83AR609FV5irFYdaXmrYGftpbOd1nPXWK7AOuw= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=caviumnetworks.com; Received: from jerin.domain.name (111.93.218.67) by BLUPR0701MB1714.namprd07.prod.outlook.com (10.163.85.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9; Thu, 1 Jun 2017 13:05:55 +0000 From: Jerin Jacob To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Jerin Jacob , Angela Czubak Date: Thu, 1 Jun 2017 18:35:30 +0530 Message-Id: <20170601130530.11443-1-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.13.0 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BM1PR01CA0080.INDPRD01.PROD.OUTLOOK.COM (10.174.208.148) To BLUPR0701MB1714.namprd07.prod.outlook.com (10.163.85.140) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BLUPR0701MB1714: X-MS-Office365-Filtering-Correlation-Id: 35da9381-f3d5-4654-ccaf-08d4a8eef145 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BLUPR0701MB1714; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 3:wa4m67d1YJAHBSVu5Yp+fRYPzvyzaJPMEIDvELosgsl2gZ5s2gDXxgR1650OkSbInvI5n+u7up5Jrs5nRKdnt/PDKCVDErZELffQ1tSABoUq7rBrWVTIJiTVAUrH0s+Xm1485mXLXgcYXbwRcwSdUNWvdLiB8IXJEgznmdw7f+Awu1NWvfnbBkndwMvp6dxhv2FNDq74Bk2Aajgw7BhqtbL8syraJcQV7WY1RazWKgj3LkrzXX73a28CueX6WKHx10fCP4F5z93y9psuHRAkxTfrBcsU1WTDPErF5ANoBlCATiQVfEBN+ryIq+PTfQVWKyqWAoYRscs8HU1ovEXpNg==; 25:/NBnm6KkJLd4upQ0T0J7KeyV4F/FPbOydq/yrECbEyRSVW45w+xg08Jqua8xwbf9UefX2xycfR8T4ta5dX5LgwbMUStmiGZGls+inwQkZsKC5UQxWUCfVH+LUGN4itTXmQYjmbjq3UvThuC4BC4bEWlo1bhb71bjW+xGsFKY1BDAARKm8gmnrRI52HrJSo63q4NRedw1o9NOOpoSel8CwCtbo5K31ugk6iSTLtKkVCHg4upcL4BhUD5yqGRNTyY6C+s2Gry4uaAKsSrTnDKRz9voOGm65bTT33bdWemcTw4fM/P8UT53hGuseBS5Cb2Sualjmq6PsJC9pGHNZ7TYCROqBYFZYaLQQmOKj92zvWxC7T9Oa6OWP2sVHybqkqrIn93rXIrPd/z2k//YsYxYeJq5ueEL37QhT1i4PABVdytau/7RoTOPHy2Xd6KgYfYC0F5D4p/hPMpr6uocbDurG8LcxwApJ2Tz7GGYazT4TXs= X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 31:XnBXBynbo5pcFO3b2ZOqkQFxndF4th0wFiPPGNN7wo1Iir8insnAZYjlE6QWRU52wN304kYhb3bbLHtC+D2oN1+oPAIMD7fPITdPQlhQNpYtrcm7gkDAfl8/Ttkv/K3b/q4rhBotFiW+Mq/YEGvB6/VdHtPOd26HX3xhHbKqVt1QAPDM28n48YTt8Gc2eUDgAyeP4raxn16xICEqSsJys6ceEV4h0Ll9B6bR/QCwLOI=; 20:TOIBeRoJwcLxW22aMdovhwytokfw/Xvc03cl2x0i8fmXgAaG4DHQGd2LBofhht1AHG8TWiJjejkZ/xAj4akpR3eYhK9KH33xuib4FY6y7yG2y+/nB+3li3yUY28QQMdgBKK7v887xeZD2AXQUT+bna1DJTgsprJn0QTnx+bMuCSpTyiJeSeh5Ibhc1L0r+eUOOQDG2Et5wlvhBmGy0x72GH+OwRh7IYJC9bCsHPSQPphrIi5jiLe1e3j9N2DUpViaDfzV31uJb48OTbJk+JFbXoymS6vubDNMtJk6WvZY82tJPWvKEyU0ADY7j7S+oN51rdwStMtDzBDFQcV1mTeBQ8r/we33SoGk2tsbJeVBZcFUTyjLEbr98pGUGBlI/qdK//qt4ClvLBIPuFJXY3oixzoIGdaTUJVqfQEalx1LGKoKmcraSiDz9XQxtf/itTwOVGgZ/IwbF/TQhfoVsr91ZzI58lu3nZPm1jZZOHKRDLpQfwjSTly13xpENIkf0lwi8mCPlcCUUVHrf2HcRdKA/N2mte5UNx+j3Hax6YvYqTOourSwvKNj4sUghkRkdH2lqPE2VLREDDz9Jsaln3EIcmzMOp1fTJW140AETGa9Z4= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(17755550239193); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700097)(100105000095)(100000701096)(100105300095)(100000702096)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(93006095)(10201501046)(3002001)(100000703096)(100105400095)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123562025)(20161123558100)(20161123560025)(20161123555025)(6072148)(100000704096)(100105200095)(100000705096)(100105500095); SRVR:BLUPR0701MB1714; BCL:0; PCL:0; RULEID:(100000800096)(100110000095)(100000801096)(100110300095)(100000802096)(100110100095)(100000803096)(100110400095)(100000804096)(100110200095)(100000805096)(100110500095); SRVR:BLUPR0701MB1714; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1714; 4:YA2knb1J4qwYj1hiOcaWjJvUOraesfcbIWJU02fw?= =?us-ascii?Q?Uo1wWaz8yT5qz7A3zrGS/Tk1TnHIXrSfCmKS19Vy0U1RUY8SZzB+6pITnNB3?= =?us-ascii?Q?HM078QTvuEfumIN3cDh+Nf1QVGQO/RziW0k0oVqQrK2VqDQ3tvrZL1FEul+t?= =?us-ascii?Q?l1nxzQ6Vj/pjMvH5sKprCeqDHCtvHMq8GGFJ5Edl4K3nheS5sgl9Pnahh/lY?= =?us-ascii?Q?PAyPzZPSlW+birjrXuGA3qgexfF+404dB9rRHtZMEkiaP7wmE6gSS50FA74Q?= =?us-ascii?Q?K/nIQzniCM1YzzLdXU8GvsOa1KwU85t9ekLOCM8JRvXR/fGHn7X+/R3P3joR?= =?us-ascii?Q?gnntzckd6BOMkX5BK6lfQBG+SxpEY5wxznSaxzdp3IcaPmq9Ztslni8Y1dzC?= =?us-ascii?Q?GMMJwvj24SlChTrrV0FoksMXAXwH9cugQRc7mzlyhbLXdhRMv+BvTsy6Twne?= =?us-ascii?Q?pB79izNQXBFrgx1IJ7iTn/fbLNfwYsWCyxTKc2zXfnPSxY07Wc/nRXi1XlrD?= =?us-ascii?Q?qetFvXMcclaHIVFXPmzmPRUlLZi/pkTDuzj8Ymk9+CiY5XEJ11gcZGTSpLMk?= =?us-ascii?Q?BmnqqUhEFogXR4dRXaZIcsmB2/hH7rXsh3bJZxcx/fceN/4LTAO06TO+O4ry?= =?us-ascii?Q?Qa5VYaTLzhKwlJQePGxE5Rqb3KhZeL+gqMRJRvckKqHQrU8kaLtjulvGQcFi?= =?us-ascii?Q?yXkoT3inoKQGh0hZYJWnpD3uZEw4D/ov1RG4a70PxNw5nQqiZd01juDZClLu?= =?us-ascii?Q?GZr0kkDP84p4p6Gosr3q/sKHWO69BVDH9Eq0/fJvardKuU8tCtnU7zy4E1Z6?= =?us-ascii?Q?DsFrLDXpZTVWDsuzzzQKDylZNwE6IdeJD3A7FEXsP40vhlme8EVs9gnykHD7?= =?us-ascii?Q?cI5a+3HzQUvJoD1LUxeKEKTa9WejegIq0k9Kn45+e6fzmRC5R+pItT4TpjFP?= =?us-ascii?Q?gQogf4tspVuJLYDitxDHmEYvtqgf3E33gttg3La80zKkFlO0bFbyszuTmVyc?= =?us-ascii?Q?tmlQXEa9u1/Tt6U2Sw8TLSiyH7AOJ+f5E8nSs0fEeePZ9r4ggVi8ywsTzX2m?= =?us-ascii?Q?+yZqoxEcrfBrv5NZ2Yltl3+Ne/xLdj6XlChBHWHwcgcVetRpba3QCcUKahuL?= =?us-ascii?Q?dWCcXmr2FO8q3ruGzOzEKQgQmBLhBFCNRuBWWjMS2DZ7dvf3WLtVEg=3D=3D?= X-Forefront-PRVS: 0325F6C77B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39400400002)(39850400002)(39410400002)(39450400003)(39840400002)(72206003)(81166006)(575784001)(8676002)(36756003)(2906002)(478600001)(48376002)(50466002)(25786009)(42882006)(6666003)(47776003)(66066001)(6512007)(54906002)(53936002)(6116002)(3846002)(1076002)(6486002)(189998001)(6506006)(50226002)(38730400002)(50986999)(107886003)(110136004)(53416004)(42186005)(5003940100001)(2361001)(4326008)(305945005)(2351001)(5660300001)(33646002)(5009440100003)(7736002); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1714; H:jerin.domain.name; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1714; 23:DnqZXOAJrLN/oqHW03Kk1JIfAgyU9vWFZ3gIqfL?= =?us-ascii?Q?R7aaPE4q6WEwpeKYx76W0PAmVZoSU4nbP4F3iUwuZV8X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3OgJaX8s0tUcOUU5eGiQpV25e2g4qE12zieS8YLtX?= =?us-ascii?Q?zZDgPhqUVbPco2M8FtEwEwFFps1w3vs5pDlM8lbobVrRxd7tt/87Rvf+gxp5?= =?us-ascii?Q?7USJ5N5WOWI5Gk201SA0MTMIaq3zbixA9sx9yyGu7SPA/89nYdC+5o15dck0?= =?us-ascii?Q?fUrl/wjnBZh+jTj9M0nb2zy+9FzYhUFMmbCT09FqG3jaYIuEMSRAu7g=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 6:AI78eSpyPSUqrgesVPXHudIh4U5kG73Ne+ey3U5z9epIEKq1k5o1df6dVOXNyHiVEbhvXxVz4M4Go/yygWgZhEP4Y7GDNUr0g25FHrL9MeYJvb+W1PIu8en4/L6YLxN4pM6qcUYUo8I3W2wXeT8ybeGbwkO2vPn/iJRZ2QM9Vw3TFDtsDRltNVwspnOy5z/vslRwVVB4yPJBBtkemviGrc5IKSj0ywgXXCmvp6saGIeztih6Sns2WLqFdxIvudwehl/YoGNeEWywvE370OK8qeokerXKbQphkn/eCjSFHnhqE7Szt3r7jUxPfx3mQ9GvG4bBNgQFhA2cF6zD9eeOD4jMm/id6S3oEZGIEWwozTRwwqMDUrwRNmk40xOmnmA0z+a3MwYv38i8+UJKNyBpJ18+DmeT59gnDXUptNl9CarRKDfb1iIxlVXP2/8P0PRdl6CyUoVDsQAQVugzfBMrCMSDhzOmb2aY10L81CMkVIaUxI+2nvvygspQXn82l/mMTyuJG7Sud7X0GBwVyCOI/g== X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 5:bePlxhcESG42WinAHt80fcH8+AbHG0synNdttXLCr2lUnHYBuwapC/BG4dVEZ+X0jEXIF7aQQ/gDwUXhiuEHSX1Ld2F7iN6kqSc3bvjk9SSRkIjjJ2TXC5KizAXUKpxB8rQtn80AEKnqc40dS8aHxnKoxrG6yaW8xyNs4Z/xUgwXYi+3eZzEEyUVr9eGYviArsRhL6E0/NQtGiDKNhEUFBZRyAXz2b4sfSZ922n4jkj+uN84n3eiajfqBue/A6qp6H8x7sz59CRyPurVPXKX3JMGYCO0pEVmmg9On9qV+VN73jopr4s26Tk5xEmmqwwWp1eUG3ledViNaa1ci/LOUcKjV+gxjKJcc7CEh9yCDyoF3hXucF3Z3hh+iXnwdMEAdMueuJyhnj7XXe38kaxmdditJcUd9upGfNuwU3QGnYi9XeD69v/9tjQvnyJsCDk3VqDcJvtxF4V25s08qps3j7OAjICmf5uh6+CG3wQ+VeIqFPefZfEef0NXDWscNNVv; 24:+1GPD4oau6/4nWXcL06+8trpetDoItStqqjGleoysEqzPQOAp+uHMIqzl36qYhbhNUHd+c22Budn+G+ieGEWp8ZyukO3BrrhA/IVsR18UNU= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 7:4G3VnqdBAS/z1mLQiqjHaQ+tmYeMz69FI8j6B6YZvULyFY+ugpvJ5eSsjk3WrxMMS9LyOjaC3mog8eNGMjHqNiisn2Ce3+8/jqKgGEg/D7GJiv6W30XDinJbVA5k9T89yV/czw8LYoc3ge3r620D+fiwLbg7NT7/8q/j3Y3NNFmzs7xc3Eh2KFldnAqXtj/36iXrrejxl1sMK8mQ9FGU1LDUfXrnDB4bq2BAtF/pRNlUtgGSnc/2u0P2NzXbeMy+8NiCdIWHoBhTp1nNLO0HUr9Qq5XqghIJsz7PTginnAQy8eeLfahdPOe9DSQBtAor6Koz7dbG/wHdCcOvAGn7+g== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2017 13:05:55.1054 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1714 Subject: [dpdk-dev] [PATCH] net/thunderx: manage PCI device mapping for SQS VFs 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: , X-List-Received-Date: Thu, 01 Jun 2017 13:06:00 -0000 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. To keep the same behavior, moved the PCI map function inside the driver without using the EAL services. Signed-off-by: Jerin Jacob Signed-off-by: Angela Czubak --- drivers/net/thunderx/nicvf_ethdev.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c index 796701b0f..6ec2f9266 100644 --- a/drivers/net/thunderx/nicvf_ethdev.c +++ b/drivers/net/thunderx/nicvf_ethdev.c @@ -2025,6 +2025,13 @@ nicvf_eth_dev_init(struct rte_eth_dev *eth_dev) } pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev); + + ret = rte_pci_map_device(pci_dev); + if (ret) { + PMD_INIT_LOG(ERR, "Failed to map pci device"); + goto fail; + } + rte_eth_copy_pci_info(eth_dev, pci_dev); nic->device_id = pci_dev->id.device_id; @@ -2171,7 +2178,7 @@ 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_INTR_LSC, .probe = nicvf_eth_pci_probe, .remove = nicvf_eth_pci_remove, }; -- 2.13.0