From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0069.outbound.protection.outlook.com [104.47.32.69]) by dpdk.org (Postfix) with ESMTP id 7B4916CCA for ; Fri, 9 Sep 2016 10:45:08 +0200 (CEST) Received: from BN3PR0301CA0052.namprd03.prod.outlook.com (10.160.152.148) by DM5PR03MB2442.namprd03.prod.outlook.com (10.168.233.12) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.609.9; Fri, 9 Sep 2016 08:45:07 +0000 Received: from BY2FFO11FD034.protection.gbl (2a01:111:f400:7c0c::174) by BN3PR0301CA0052.outlook.office365.com (2a01:111:e400:401e::20) 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; Fri, 9 Sep 2016 08:45:07 +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 BY2FFO11FD034.mail.protection.outlook.com (10.1.14.219) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.587.6 via Frontend Transport; Fri, 9 Sep 2016 08:45:06 +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 u898hoZ5018305; Fri, 9 Sep 2016 01:45:03 -0700 From: Shreyansh Jain To: CC: , , Shreyansh Jain Date: Fri, 9 Sep 2016 14:13:55 +0530 Message-ID: <1473410639-10367-12-git-send-email-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1473410639-10367-1-git-send-email-shreyansh.jain@nxp.com> References: <1451682326-5834-1-git-send-email-viktorin@rehivetech.com> <1473410639-10367-1-git-send-email-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131178843063882936; (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)(189002)(199003)(105606002)(106466001)(36756003)(50986999)(2351001)(86362001)(50226002)(92566002)(8936002)(76176999)(229853001)(104016004)(5003940100001)(2950100001)(11100500001)(77096005)(626004)(5660300001)(586003)(110136002)(189998001)(8666005)(97736004)(356003)(33646002)(7846002)(47776003)(68736007)(19580405001)(50466002)(48376002)(19580395003)(8676002)(87936001)(305945005)(2906002)(81156014)(85426001)(81166006)(4326007)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR03MB2442; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD034; 1:SxVhDLNcc619cOuOMM9nd789KjsykknLP4Sq8TLrMxHnQDpZnU1aRN3i3/Ro/ZyWLSJrjTS5iFbIrIM9DtlaCgvaFKJOQ6ZkqSqAKyY0Uax3+Cg0QT0c61MSqKxhtnqJHpKEB7C+mZAjVHPAa2oueNbsEckVSR8rSbXfszrb9QG/HbiEMAX/E/dQE7Se8pP1HQVhTx2IAKvGVtuc2/znIjwASX3kyNNI52UsUydUAFnksfwU/CG+2U8nK440BSH01DOoTpCueyoLFHyve1/8+DsDgDDBhwCIxXMJZxZkQwB9/j3HenY9AP9INpvhliqsB93DnLAXf1b/5s8JPqyFH+SXH7RvzsW8wHdMbhqSv1cxl0Hvcx7+kq2PnHowMdj0hmH5DPKO2zKsEO0O9tH1wwojC8bERswN3he4FQY8yMa1ew3yPAJbQ+T+bsCbQzqQeyB6CGDHdYkCDsuSJmU8iYRWFaLaNQsXK48H7HQ56isyHFHZiBLxiRZID+rdR1mCZKrK1A6X78zuFguwj+616nHTPK+pQUuGvyISlMHQD/GXeU5GfPychd/HO26OzjCDf+XNlZaWvIXPyIRCDJ5zzra8FB1kLfyO5/lB7a+NDs8IAxFYdI0AZY1Fj7BuYCIhAFCreTXQnprTH9Ih6pheAvOnDN3A1PXqY/PB2RNm/xQIg2jgcXf1vUeIWW1/fdkwHyEeSw9KUAbuJUqWgIK7HC/gwWAdifzpONwV/FDM3jk= MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: f28bf3a9-9b84-4c2b-94b8-08d3d88d9955 X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2442; 2:B1RSJSCeEqLyw3Gy8g58jYzOfpz19wUqxqhcrxurOe1WfY8uRbfqJGSH+7DbLIQHaQAty0yKgp7Dcw8eOJs1zYtTH6HsIcOcSPO8VRyoNckVd4rUyuXHQO8ZRB+CYmpQ4wQOLFpqmCrKYNwX+EOsaFIuNeRwD+TvN2V26kLOTVuvAoCvtcYTEKd6BUDtklg9; 3:dLohajqneiKx1tlYvazQYjp8jjsP3vwwrYX7e7GZfDD4QerGKlV+LLOgtfPhonqf1yJmflExF4Vamff6jsrGfUo5STs6WRgJautM/H6+d/TLUb/mh2nWy+6UT+HpjaYA9vfADZtH4NJLk14uskpyv48BffCqLfkMiR7gDinaPuHLLVTJ81UaQMEITsLlSNbMNGUBaG8VE/XKJzOH4PW6lFzQoNxYRmAG2BwWFH+rzAk= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM5PR03MB2442; X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2442; 25:oRxgh+krV1k/+OMbsFbf3KEpW3u7qa+j7u4nqeY5l9MY+Z4n/5U2LKr7AZn6o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ivAekFDOwC1+bCDeBI7efJ3m0CSxQFJhCYL0PGPWhduBugo55RwV6onNHxHsFl7bVaX8XJ2pQtcodm1FYznWstTEqDM4J5JkZN0pdEyNZQu2OthubqyiWob1X/WgIFAwSL8x9mjUONmG1+va3G5nYdyL9oMv1Iv81+CC41hqrIHSykgzaSImm2BNe0WR5nFz5fLQZnMUOBT0GlkvFUVMo/6eCUw++cyiAZiPsooefGKOk2fZ4AKq25bkMSIW6/UK+E05ZDO946Yhdt5JGBljX1bnSKjFbCQwGU08vZArpLA2CWusMCdM3URKiHzgzixO6HNwKo/NCifQwqGqazHrKV0zB/nNS27s4L9i+tCrl5MFOH+wg4rU41uZDo8f4m5jrqkfWD3QFO3Z9R8BpfPIB5ooH9EQmoOwJeqCW7hQqGqeJ/IfTFS8fhGKOwP8vLMxufooiGWYLNQdsWOvuHw0YAkWgLc= 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)(13017025)(13015025)(13023025)(13024025)(13018025)(8121501046)(5005006)(10201501046)(3002001)(6055026); SRVR:DM5PR03MB2442; BCL:0; PCL:0; RULEID:(400006); SRVR:DM5PR03MB2442; X-Forefront-PRVS: 00603B7EEF X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR03MB2442; 23:5wJ9fXSnGzqn/oG9IfTawMvOXQJEU0JXiBCR7HMdy?= =?us-ascii?Q?M72vbQevgql6gnGf05v+u3B7OsqcOmDTE65Q4kcWc5MeJ8N6A2mG29Mpls+H?= =?us-ascii?Q?bfr9Qf8DMGelxKQpfY7F6pxjY4aEZdUxDpE7aff74BytoLv/C9+X+xo/W2Dx?= =?us-ascii?Q?Cq0/gdEyPdOhJKLjdo25jIJiio75gyhYqnM9j8gLTH0qGgaFpFl3HGxaCW0L?= =?us-ascii?Q?7b7ImIJKnuVvm59iAFl9HXl2itf8h8gW/Z2wzfbVf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st+4L7L7LgTQoIaIaZdTLF/FvItnawXZ3DOL6Rs6hw?= =?us-ascii?Q?wzW2ZbRPI19Rds=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2442; 6:eN6XCWPc9qjR6oQgEf02DeuIoKps87nalNQtH81Rs9bc5cmxFDhc796SkypWJ/epH6JiUQyj8kUthd0k6+3SSAJMB8SLQyHRtefgEoKSM/PwpqktvPDm7e6n3z0JKijeTmwVWfo1ZIJk8sE/uOdoeXZn4qRQRpXjMYxRI+CJ0fkOm2NOp6B7+VtfY0Tk7wGOIFA4q4DOwuy4Myj+69Iu3fkznhoz9HQOUNqlGqep0S1eB9lB/2WgMsCE51F1LHJBIH5pqywZUWKI2ItybiSZqVbCvT1/H6RxKFJSf3U+9uE=; 5:UeLDD9tzXsiyAN4ZRBopyiRj2ttkEJs2DrSKTyl0SvW7uJW9z7/BoueIMEXljqKKf5QqAYh0ItN/B45PtPwdheFztXGvKQn8xSMcyv9uZqVn3t6v3conLyzT+LyHScvZa/fE14dCU9AVk1saM62Bx22Vjmolqovas0sOEytP1oA=; 24:z5LA6nhnAFiq9H55FQlJZnhuIUkY2D2SI9Ks2h472E9XNqHQvVWT2nDQJr4UGeG04Y/NPw4b0kuJCr/IwtlBrHaU682dvKq0r7XhpTBAfjY=; 7:EvQVUu0Fuq41h9Yj1R1xg6KMDJi2x7q4jpsSSx8x3MJvMKIfjw8LVQKxcVtSorr7dkkbRMYXEk52kA9kSwi2420l6Sod0hP8Y8BStDAGBOQf7BnS3LFhKAKzotFZXbZ6c8PiiFOxe0YEE3CDdJag0R1xtrhtplsq/0yOLicqefN+3RslkiVuHh5TI1pS01gdnKAtmjJ5gr7qbIAAuNrHNnUjCfUK4Zn4dLfdAB4LguRH8qkokXX2xoQw8E5qke73 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Sep 2016 08:45:06.2010 (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: DM5PR03MB2442 Subject: [dpdk-dev] [PATCH v3 11/15] 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: Fri, 09 Sep 2016 08:45:09 -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