From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0071.outbound.protection.outlook.com [104.47.33.71]) by dpdk.org (Postfix) with ESMTP id DA1F05680 for ; Wed, 31 Aug 2016 13:01:59 +0200 (CEST) Received: from BN3PR0301CA0011.namprd03.prod.outlook.com (10.160.180.149) by CY1PR0301MB2012.namprd03.prod.outlook.com (10.164.2.18) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.599.9; Wed, 31 Aug 2016 11:01:56 +0000 Received: from BY2FFO11FD043.protection.gbl (2a01:111:f400:7c0c::193) by BN3PR0301CA0011.outlook.office365.com (2a01:111:e400:4000::21) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.609.9 via Frontend Transport; Wed, 31 Aug 2016 11:01:56 +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 BY2FFO11FD043.mail.protection.outlook.com (10.1.14.228) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.587.6 via Frontend Transport; Wed, 31 Aug 2016 11:01:56 +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 u7VB0lac010481; Wed, 31 Aug 2016 04:01:54 -0700 From: Shreyansh Jain To: CC: Shreyansh Jain , Jan Viktorin , Hemant Agrawal Date: Wed, 31 Aug 2016 16:30:32 +0530 Message-ID: <1472641235-23626-12-git-send-email-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1472641235-23626-1-git-send-email-shreyansh.jain@nxp.com> References: <1451682326-5834-1-git-send-email-viktorin@rehivetech.com> <1472641235-23626-1-git-send-email-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131171149171004060; (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)(81166006)(81156014)(105606002)(11100500001)(77096005)(48376002)(8666005)(50226002)(2950100001)(4326007)(33646002)(2906002)(50466002)(5660300001)(8936002)(626004)(8676002)(189998001)(104016004)(76176999)(19580405001)(86362001)(19580395003)(68736007)(36756003)(305945005)(92566002)(47776003)(356003)(7846002)(5003940100001)(87936001)(50986999)(586003)(2351001)(229853001)(106466001)(97736004)(85426001)(110136002)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0301MB2012; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD043; 1:zpUsYy0z9rJyWMBYdF5b8aMJenqpiMXbhN6vsyxnwZso/mNZYcCVURqbuIOROs4z4hRoaFLAqx3AS96iggX8R3TfeIOb3yc+4x4SDzofyOHfaLKZJIvYLV7qFccJs/07d7PsYhlkh5AF4wvTLovpBUwAqDSil2YJenqXI6kIloOkTFrc5W4K+fFST6VQvxCyb2ms4LwGIrKjItxbocEuJI3UjTEndAL69JWCRzup0//W3CTikfaronsRHxF7o+CSqsCG2Q716SB9nOTTagJlD4/Ngnx17HpIqZscfdMqqIcWabW5Vz1n+lFLkKtYpTCzdosSOrfeOccS9FiaNEMlaSY//8NblLAEjARpBfiu17JWmXN6PUlz6ylWlcmBgtXShYZmTWTLefGOtvfGYqy0Eh+D71WyZthiBkQGDK0Y8sbsOPOcCJI2LYhIr6VXOpviqdZXgU8MzORHo6cInEQ0yqXMv27+wcq5hYfFRIjCnyzpk+6EYV/2zmQgzZx8DtUU9XUTftrff3s3e9EFr0zbwCygUbtYj9WXukM5vYHM+PWGXAPpjfOgXh50qLAj7lMLaiRtjAXvcKq+tMWUJWDIZ771JfWBrfwyy/RK2W+AvkJ55nMKI+6ZEzJjXBo44p1LZ4qC+VBpxUpMXq2xPT+HAYaiMuoQocnmdYvuKoPWOZaFLP+DbSWNfzJNWAb48CJGGRSVuBMZcb5B62UwrKbvVm986qJabLdvn34VK/IqCYY= MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: cccd3853-555f-4a8a-0794-08d3d18e3982 X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB2012; 2:/I7tbcutN5GAOIIykQfWNBJcJ1dLOWDjcTYlIYSSDw9L/uJbfZZ/YwxdSyhv5nggNaYa0KXBsXnxOa6NO8niUe5oOxl3bDUTgEWii1TOZ7YwPLNFnTUjWHK9ByJWiSMIEwoG4fDaFSPcb5CdOyqafBlOcl0GbOfkfrR2r+Fj1jLWDkBddgT09nogbDysF5vJ; 3:OqBXabqtgEXzbQnzAOVlJLSgaH3ybFOlTR4IONppg+p2WQlA4LCGKuzHNB0BHgx8VeAGs9fTD9j1bwgMAvimYUqBnjTZMYhLbQwFGjVkgGBEpQkWjECMbiXtNjrkJ59On0meNsjMmpYmjmUrkm/6oi0KzYCE7+THzOaedAdA2duoLpDL/JZQFtsMFE3NSXAsqFEr382fQBP7Y54qZhYEHJuUV9H9hoAkUo+CI9tJU+I=; 25:AkiQE0TsVCGhr3JM1z4+yTCICBxuNTsb0HqFaAi9ax/5HnbNwFEYtWzBeMnxLiAUhyKKlyrs23CX5b2VC4RwYt+BwK0+hlPw8q1RNHCCEPTKAF5K7BWVsjYUi1gdqjQDNDixVcWbuYMJ/HK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8m/fEiNlBUcPrxw9r8YrKSyOaoZdcKG328iANsckmQKm+oF3bJvs03FXQRmXXbRmu5fJRZgqLjdfQ6J5B+BaWswAt9uE5UM= 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)(5005006)(8121501046)(13017025)(13018025)(13015025)(13024025)(13023025)(10201501046)(3002001)(6055026); SRVR:CY1PR0301MB2012; BCL:0; PCL:0; RULEID:(400006); SRVR:CY1PR0301MB2012; X-Forefront-PRVS: 00514A2FE6 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0301MB2012; 23:e5/nRUFydaTa/fZ22o3eojBzhFtY6ohfR0mK8DS?= =?us-ascii?Q?lLLiUj5zzutYiqUYPiFYp6q19zhbvm3dlGqYfQOPB3bNRS2AcjyCVhX2f+yP?= =?us-ascii?Q?qSG4dBN2p7vug9MJFgRu1wpZjt3sJBlMq0kvJFrtzLaZIPSZGardsJuWoIBb?= =?us-ascii?Q?UgyWx/xnptQC3KiiEpGQjB1y7XJR2xlokXvsjbVmZGKEj9Cml5eGf85I88xa?= =?us-ascii?Q?dTQexrORPekU8RpCcUHD2i4mKonwyFuwbgzY5ogWLFKfzFxGGlDSPwWv2rvn?= =?us-ascii?Q?KIvV1ysQ3RtAWi2K7hcV251cb5hS0E1fsfKYLvoCxemUCYA6qtg3882h/K9j?= =?us-ascii?Q?6uHCfXOVSfYpmuU34YSgBZx2809q277RDVEosHMw/xi/b1L0SQBlvLf3ukzP?= =?us-ascii?Q?0uX+syOrEJkyisOPtTgoZi5a1/OkO3ljHUQTQXzKDkpy7CcgA1F4JcXstO5T?= =?us-ascii?Q?11/PvVZjbPp0r55yJVZGeFDU7T+1tagMSQz2Z9noAAiXCPqMDZDlOdORHxyg?= =?us-ascii?Q?j7N4g57a3pNgN6rraBPC8sYvrpEqjyihsImKW3EsV6IxeCAI10w/sDvqD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oBjP/8upVtNDp2ExjoJ5Hy/17bP2l/CTMLPGs=; 5:k02ETzOTIii14/Ijj/2PnGdticOOF7a/WTEtUhHdHuOwrCpl8JC6k0IvnMciy/O9o3KAsDEPK2MzYbBwpFEvOib289pQ6EDAeJvXuNhmGj9ZkHUWY64x4VhsIrHFHAyv4Q7Z0U0pOfKfow2Vkuu6LN+OlnDyFEb1MGWfWdUBu8Q=; 24:MEOBUYuhSgUHAw3d+bZCSDF/vx4msvdvkolUH4oznoEBAmg4ups27WaQoN5cBy0cjo3FPaMrjH5icR/+gn1+m4FiGJJMNUGHBAxTUny3+Cg=; 7:8VRD5ZHpc1j0QQJ6iDvsvfmgv+Fup9b0OXX7IBKfkwc5ttxk83B2AZAcfquu/D1Um82gU1oFq736rnu0szZ0rl3+SF28F+VD/d+MrWY7q6zU1OitL4u6/n4Sj0UAcelZIcXWAOFALcYXO04s2+lWVSG/MlsIy+JfDbAxiXaxkAo5CTU2IWSezBBKspcLrIV+wn2C9OeIDa7vmo9HU7ZGLPR+ipXcYOKzIUNVrFUnM6DaZqgL4jI/LhfotU1Tir5n SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Aug 2016 11:01:56.7884 (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: CY1PR0301MB2012 Subject: [dpdk-dev] [PATCH v2 11/14] 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: Wed, 31 Aug 2016 11:02:01 -0000 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 b10d985..e9f5467 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -3200,6 +3200,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