From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0052.outbound.protection.outlook.com [104.47.36.52]) by dpdk.org (Postfix) with ESMTP id B2A9B8D91 for ; Sat, 15 Oct 2016 15:44:56 +0200 (CEST) Received: from CY1PR03CA0029.namprd03.prod.outlook.com (10.174.128.39) by BL2PR03MB323.namprd03.prod.outlook.com (10.141.68.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.649.16; Sat, 15 Oct 2016 13:44:55 +0000 Received: from BY2FFO11FD052.protection.gbl (2a01:111:f400:7c0c::157) by CY1PR03CA0029.outlook.office365.com (2603:10b6:600::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.669.16 via Frontend Transport; Sat, 15 Oct 2016 13:44:55 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com;nxp.com; dkim=none (message not signed) header.d=none; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BY2FFO11FD052.mail.protection.outlook.com (10.1.15.189) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.669.7 via Frontend Transport; Sat, 15 Oct 2016 13:44:54 +0000 Received: from Tophie.ap.freescale.net ([10.232.14.87]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id u9FDhhgU021870; Sat, 15 Oct 2016 06:44:51 -0700 From: Shreyansh Jain To: CC: , , , Shreyansh Jain , Hemant Agrawal Date: Sat, 15 Oct 2016 19:15:05 +0530 Message-ID: <1476539108-13170-15-git-send-email-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1476539108-13170-1-git-send-email-shreyansh.jain@nxp.com> References: <1473410639-10367-1-git-send-email-shreyansh.jain@nxp.com> <1476539108-13170-1-git-send-email-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131210126948921610; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(8676002)(50226002)(87936001)(106466001)(19580395003)(92566002)(36756003)(81166006)(19580405001)(105606002)(305945005)(2906002)(110136003)(8666005)(356003)(97736004)(81156014)(47776003)(76176999)(626004)(68736007)(11100500001)(189998001)(2351001)(6916009)(7846002)(2950100002)(104016004)(50986999)(586003)(5003940100001)(5660300001)(86362001)(77096005)(33646002)(229853001)(4326007)(48376002)(50466002)(85426001)(6666003)(8936002)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:BL2PR03MB323; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD052; 1:vkiLaMvGUR+uqsoNs3Tw3GyPdxNq1V7lrcibT3hJKq0cSBIBoUgP3nNbfnuKcSPcvHkCSHUAnt82HM0JmRVw7jLMKlDEJl0y1wb09J7Wn8zHkYaDU6tdikwqfAJA3NdgyUmx0xMjHoDjdMnr9WvzEpz8IOjM/o1zzy8HAxnVyrWOoqHqr1aVH45hVTV1uUYBzJMaAU9963Gc3l7LaGXgysoGJhOP6sVqcTvKs9GsB/zM7S52LErfgXtP5PQSqzEkmIATa7cYRrgpEgw65Mbv9PImn5XCVQu+10g7xWvx4vlph06YATi+/5QxiIer2C0uMyy1MLt+X6sseyM+nuqh4O3L5BMJv1MBYndGBBXsddoZrUFaaTMOd3LIbqEnW8t+nLY8E3ZOKe0K0K2fEYPK390OxeDgFSVhEwW/04TjpwRkFzatw+/3z0WqGnQa/yebTsGDSb3u/dSzNdhrWi0ln65tgP8xcrjeyM4KNYhNoBYeOAAAXC1LC9uYb4LoAsFZYNqA8xP2pGQDAS8Est4uAFYqNPURyXXtyAVcwMIvwdmanbD8mZKP0AjwAfTfMGW639tbwmhQs9aAX7aPuGjBL8brmi2Mm7GrMKNDXMjocOs9ELBgEd7MvQV0/JZmVrbh6az/V3H/5GWQd+nyyjfEZ/YlXXuIbSUQmM9puy5PTvXqYYRCrO1IQeVkyZlUcZ5H/xJe4jaCpTfrpWJ0OiCh/XP9Ba/HcPsD7O8hTmPy2Zk= MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: eeb4389d-d05d-4852-710a-08d3f5017230 X-Microsoft-Exchange-Diagnostics: 1; BL2PR03MB323; 2:ffPm4yQwaMQwQnwfEqms1e+jvYOhnkfIjbGUu19clrJ5ajGqOTnOA24PciiAa/4xM3yXcE6eoZAVcLzUaC9zObnrZWcUjo4va5l9Cd5yg+YS+mSEjhhKDKElX9qoE8zbqBLriKT43BSq633BNBOZVYm7s5aiknc17lu/o4H+EHK8Jd2yXDaXTlxFYK8oMwirZCSopxMtyhkTNxjp/ygtQw==; 3:Oij74uFPDUYGFQFm7d5oUbn9fNTdWFOUE0IQfOLTevFx6qbdCjgl7z31COB5Mwc5tJdv0i1BKSsaS9ZFEm92M478JEvNkdkYi/U1rNWLgkEg7ILWW3OZT+HHHyE6zfk8VqIQOxmK+10iA+ZXhXh4+heR6rA5cO+H3JVJPDQLNhweydu/kLsDgjc25N/EGaX7OjFUlmW3xT+BX6uOuR1MQwDRjlnu6e9/uFR9OQNkTNULR8Avti5bQ9HfyCMy3RUL; 25:5OSjp8iVPIbHBQiO6yJhz4vaznPSBsCpml+e/QMmXtTDQ+bLolSe2qb1TU3B+MkH62qQwofhLOoaAJHbbNjrV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ckEe3iEDPQ8kp2x8RYv+haRIaXOKJTavxxPI8gXR3zyqdQr78zv7RHIxbCRpXQVpco5hk+dbOhOIttkpENff0Gw4QEcbcbaKCCvMhr1KMFfvKo8zkrQcr463xM9GcMXDnemDRmdKvfJiFWS8m1wa5f1GKtMKzu/8AXOoZ9oQ/s1BYIZ1BYny41iKnShkq7JGwU5k2M6RCioNJQWUEU+0eZUDDpp8HDThL8g7Bgi07cuWFmG8cvTmP3YkAAbkvZtA0XJo4A8wcTMnML7TEo3C X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(13017025)(13024025)(13023025)(13018025)(13015025)(5005006)(10201501046)(3002001)(6055026); SRVR:BL2PR03MB323; BCL:0; PCL:0; RULEID:(400006); SRVR:BL2PR03MB323; X-Forefront-PRVS: 00963989E5 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BL2PR03MB323; 23:+tikwd/3z19yz6gWn4ufifyT4H0qKkg89KaXkxTJrQ?= =?us-ascii?Q?QqwkRH9SYs2bsgh2dnqXgj5NK8VvF2BI7IYzHD/5PrVd3sqSBNTF5xUL1Dax?= =?us-ascii?Q?RsRW5s85k6ud/GYD5fCM+jRfZvdF8ImRQ9CE3OFOYgiVr4/4HA5DqidjB7kR?= =?us-ascii?Q?RBQpLWMgUrIsPZYIh4wGPb6lMeBjMBI48Qf+Ryu61lrvTCETnCyDgbZGKdsx?= =?us-ascii?Q?mivmfKCfplOQZoWrR+8NMj7aQydgzPjbttUlclFBWKbUdfRGXAq83dl7dsz4?= =?us-ascii?Q?WpPlyeNyg1elyWBXygLk3qz4YFqN02eLiSYxayeX3DzYU6zjAEc2xrRstqjW?= =?us-ascii?Q?oE9uCsJ7qkehKI14qBadWQioQHT5RokwsUxWt7CA93OTn7kVc0cybj3TYDkH?= =?us-ascii?Q?4GdFC9T7Ui4eLPxMptGt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VsnsY4NyWVrz9FbnysiZMR5S1HJQOMZT33r+T7ramCEQnw/1h3IuzjJKo0wh71wRGtFrZIVGBuXBDcd2EA3YnbrSpdFtuQJsUaX4frd0n1pja4EJlJF7sZKfbi4cNAsFnw33zEVEIpkQgnHxJN9F5D/5xo4T+I47ztE9lpVr/nLLbisCwNGLPtmrljqmek2bTc4sn/3bVmb1xVGyUT5RuRtRD1xnYv0Iib58RHhEc8tsEwO307bhd/7sJEjUc; 5:R2ZjScCK4JBxhp+iP3/93JYZJxQQD3Nv+QyBk/nHiSizqTFBm59PA6bDJvNkFmTO4F/d5UpRQxDbpKAX6i/D95EbGWgyMQ0ZKqCV5A5hjSbKhwniVuuO92FyIKn2QvaovS2MJ1ZADUeU6u4L3gDPkX2CgSlVKG4x2yo0BEk+tgh65WFbm/IL9ypYxioexcL0; 24:mNGlHSjWfXcTmevZyUOBQJ0hz/ABoxzi3PPRNkmTP7N47sbiq0YpB1TTdcYtjx5ttmAdemWnqHoVATId4HXuGFmzSSjKqk3y5TbDwqCY9X0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BL2PR03MB323; 7:ojNUYrCtqXWd3A4iMxGFLDR14+ysOzxpY6RhCinAMqujx5IVmU9hGEr8PCZpYzHc0PvLkFDhD5vLOmfvU+eCaFBj7a02E3aW/feFJLEmyUzdDAMzlOFyxy9GlX2zk3EDqoKzjHb56M06gjs5b6QRjEijdQKNbTsL9XDXMfuGuqh1Qo4fL4d+dI5RFUr2z/3D0lS7bpWBRrpg1ey9BvHUk51lBmA3ZXPJYo4hBGG8Yy32/XRZPpCV1Dxb11ONH6U2l5U8nbkubfPEr/6ZBVFwqpNZ7QXhr1zVoIcnr6wZvtk0pJp13UKacWXKCq1cojRBsO1Kv0ODYB89gJwfZBDsSK+ddnvSS1aKAFwUlPodv/w= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Oct 2016 13:44:54.6893 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2PR03MB323 Subject: [dpdk-dev] [PATCH v4 14/17] ether: verify we copy info from a PCI device X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Oct 2016 13:44:58 -0000 From: Jan Viktorin Now that different types of ethdev exist, check for presence of PCI dev while copying out the info. Similar would be done for SoC. Signed-off-by: Jan Viktorin Signed-off-by: Shreyansh Jain Signed-off-by: Hemant Agrawal --- lib/librte_ether/rte_ethdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index 9aea048..daa1285 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -3205,6 +3205,8 @@ rte_eth_copy_pci_info(struct rte_eth_dev *eth_dev, struct rte_pci_device *pci_de return; } + RTE_VERIFY(eth_dev->pci_dev != NULL); + eth_dev->data->dev_flags = 0; if (pci_dev->driver->drv_flags & RTE_PCI_DRV_INTR_LSC) eth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_LSC; -- 2.7.4