From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0048.outbound.protection.outlook.com [104.47.40.48]) by dpdk.org (Postfix) with ESMTP id B7441298F for ; Mon, 24 Oct 2016 13:59:57 +0200 (CEST) Received: from DM5PR03CA0013.namprd03.prod.outlook.com (10.175.104.23) by CY1PR03MB2378.namprd03.prod.outlook.com (10.166.207.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.679.12; Mon, 24 Oct 2016 11:59:56 +0000 Received: from BL2FFO11FD063.protection.gbl (2a01:111:f400:7c09::183) by DM5PR03CA0013.outlook.office365.com (2603:10b6:3:118::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.679.12 via Frontend Transport; Mon, 24 Oct 2016 11:59: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 BL2FFO11FD063.mail.protection.outlook.com (10.173.161.159) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.669.7 via Frontend Transport; Mon, 24 Oct 2016 11:59:55 +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 u9OBwEMc008267; Mon, 24 Oct 2016 04:59:53 -0700 From: Shreyansh Jain To: CC: , , , Shreyansh Jain , Hemant Agrawal Date: Mon, 24 Oct 2016 17:29:37 +0530 Message-ID: <1477310380-17944-19-git-send-email-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1477310380-17944-1-git-send-email-shreyansh.jain@nxp.com> References: <1476539108-13170-1-git-send-email-shreyansh.jain@nxp.com> <1477310380-17944-1-git-send-email-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131217839960090416; (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)(4326007)(33646002)(86362001)(105606002)(229853001)(2351001)(106466001)(5660300001)(110136003)(626004)(81166006)(81156014)(8676002)(8936002)(50226002)(19580395003)(6666003)(68736007)(19580405001)(50466002)(48376002)(11100500001)(50986999)(77096005)(189998001)(104016004)(92566002)(5003940100001)(6916009)(36756003)(97736004)(2950100002)(356003)(76176999)(305945005)(7846002)(586003)(87936001)(2906002)(8666005)(47776003)(85426001)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR03MB2378; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD063; 1:x2BXC3SlBAeFzi29Simq3d72P93UseVOkcqHHQfmhd0do8+jrlN7TmGvJmF1rjIxSvyb0H6sj4yYdXkn7p3dVbCKiCid7k19egZogz/jnduck+eGCO/OCyGjayrVfe3uQVMMnQTqzPeiPgBPdV+leZXimLBMBEAXKKquem31dEjmaBHO9XCbOf3S/UWlx8gGcjV+/+gAaYetr1zaImWqZjix+xkT5/zOlaUhgUsTgGqGKB2VgoPA749MdoILQS3G5xqvNxFpIgkyKCfHYSPn3gkzg6Y7ioSyLzweABvW2qmoyUe1iHIUobuQls7bDjwvi542pKwLilH3GYuKkU+fUBEmKNFQPkRMRhofWEhr0lY8xFj5oyLHloeSBy/D9fBYPBR0C921BWFGklrd0q2YzC1h3F1CPReYoRp1C+BpPa2auggLvg4dJVLEjHDrC91dLundSvpvNOyd6E7aBGJ/lLlVKhhwX0QPNkoP5I6Q0fTNQTRYAQ0e1j5zSfDgXtGH57wTQlxzOL3zz4rGGKvYOsQ1Q/Dv3+H/R93wPobq+Do7QexH+5Fq0jLRoSeqqhRFwHQSsXpq7UCZVtF0LtJzTozDEc+SwtMXv1yRbUGAWXdwZLuDtXj2/Hunh0904M6JV6XSznkZoo78uoIJEQskxsANMp7CjHdHpnVUk8n4ujiF07ibZuAoz3eruicybLcB3FF6UwQ+EgxTNW+QyWKhW6qe7pCRFOqZTYBZsSN7xz4= MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 25ef5ce5-cf79-4c3d-e730-08d3fc05457a X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB2378; 2:+msnvkFWUvsi/FqzirofH0H+iCSlDo6n6CwzVebmtIf4UUs5jz5Y6jIzG3LKorzClXpUBNDXAKWDmF0fBDyojr1qA1sTMKUd6SAV+dnXmDbjFnDlJXd+7BV6969OcA3UbPMMc4c2LYTXRUnDMEO6zDxmRb9tsbqUWz9Qbu47A99jGSml+ZKY2hFLGNCy74bVjNsS3Ptp+bG4VAbo4hHPgA==; 3:XcYoT6ZK1nZNPdm6rOPEg8bU8HyLzhrmyBF/0M37oSJRBbN5f6RKLbUAlpZ20gwgfQ7FUKc7mNlk7QrF+US4hVeBP+Q6RPhMcpPpR78p1DW88C3wTz9sQDYiFZlkf/zXIVvgZrI7+YrOK+3F9ScjufHPqTkA4eSLtO3UoT41LY6cIOc9nGFmitTwBC09TucmvKJcbnwxCs6u28aHsfHJYJiMtSzJLSG4WAm2u23jkZuzqixhsc5QsqKDCO7EQhh9; 25:pHm7wkJEssm9D8hItIau1yl8HzsddSbCX+AKLR3aVfSTiaYa9LL/vxyxjKDWAkZtBtXBF13UvvrO2H0aG7yfiySqUEnZTzaCl9U9h72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skRAKINWw+IJlIN0Ra89YWSwjFsYw92UlwQtxho0dWB9eW8UFUeF30WjZXUWJYirO032vjWLtZmrvjcLlwiTR0adzmdGEg/IzxBtmwWzV2iivUO5cyRdSK26T6M1fe+p/CILetpCcihljhC3Lz0MV5lamDgpsS76k5VsVLQ5qU0X2l1/idG2K4l3eIVM2QlVzgCtJun/N7GQNDCctQbQRYy6Jj9b1T5byIGDjeg6G/EXnNrGn1S 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)(13023025)(13017025)(13015025)(13018025)(13024025)(5005006)(8121501046)(10201501046)(3002001)(6055026); SRVR:CY1PR03MB2378; BCL:0; PCL:0; RULEID:(400006); SRVR:CY1PR03MB2378; X-Forefront-PRVS: 0105DAA385 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR03MB2378; 23:iSubGOkKKBdk2ERsGGmh7qSYnJSvtBoFHCXlheZPu?= =?us-ascii?Q?HZK6l2aE5surabvVQqr8/cBvZQfZYkb27IrjDPNxcjD9vkojwDz6jFuYZIak?= =?us-ascii?Q?efrO1en6+15rqMMWO5pfqN0EL1luyEfx5wXshwkeLAHMMOBkGDFIHBUYiZAw?= =?us-ascii?Q?/CR7o68oyohoMAuzfFDzUOjEnJOQifJ6JqdZegULtknBhI7Fa3DFzzFKXpE6?= =?us-ascii?Q?xlUayXPosViDmaT7mrlSN0TtWVJjvdKI6BB9EteAOLHdHHqCYUOY+Ra3r24+?= =?us-ascii?Q?PMKKW/QvfXoYubdt6p++TBEfiBpxYC6cdX5H+BVtEP13xY3MHIwQC+H8wUNE?= =?us-ascii?Q?/pFtZBPSHgTwJhXrJt3DYUUiUFlq6JXd5k3c3Tgs9cHVLKGKzjVJOTXORb57?= =?us-ascii?Q?7PVI39jApdxUYIIuMQX8Qgc0NknnQ+3e0ygrj08ojvZc88B4EamABC8RXEHh?= =?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djAvpreLIggbm7Q44x/5ckXBqhIlBIMKQTw2Syq8hH+FLNxEK2NB1pKXGWIlW+ahW8v1JD0n34rX9ZZIrzlzYnUjpY4IJHGMnFoiMjQhWVDRX58mT1yvP0giRXCxqnpVjhekJ4FfiB6mDk8Sv8tR8Oc2cCrxJMzs/Qlalyg9Tvn2IqpHLiqiPlnX8/syU228XywKYXdM2SFdPInVqe9kQ9j; 5:Squul0HZqb/nL6zj3eH/xgoEYBTN4/WJiMMfa/XBeN2mwOt8WsNdkHfCG0fge+ynG+1p0tEXcPiEkzB6GlSE8jt8CQ08VsyXuZGlmWIDAfkx9KgDDebRhL4eDh3uvRQpA+h0RTvt4AhEZFOG/XzmaMxb1xDZyh7pc/op4XElXfLFZQgDenTxWrZO/ovyGaZ+; 24:ZPEu0Exq6uR0D2DlnjWO0mvG/Lb95InYZPoP305yEtVgi1cnIAZ+B4IgZK2kqGrrgJ6VLMPLsfH1/s3es/KVWKeLAYg5IY0+fQEqe+X/PF0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB2378; 7:o3pB8H22g//T/JLjYL+rGBBKViownMOTqrptcN+g2Fe7tcCx9XdMqYYW03iDZE8QKCdhhm1G6TpnygEBG8PYWhb9wncqizCPAOaK6B1NYXl4uvxloSYIjMmyK983/+r8iF4F6dkuPiBMfEjQQONy0EDTrfGX+1Yo57mLiaIPVCL0J9ZHJvbHuSkcsbZjq5LqeDqRFXfFDCxGHQINpGOFb21N4IK3rinvcNtGyA5ONKOU7w5MQfIQkxl8tfISPhvbSAaNwWHz7DTCrLspmolTFLcZnD7Cxrcdx8lHmKvOHIxDZ47g7HD6MS12zy907IphlL0QdL+HAVPXcjlZHZEmwjown4PCE1LNta+JSisgRvY= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2016 11:59:55.8374 (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: CY1PR03MB2378 Subject: [dpdk-dev] [PATCH v5 18/21] 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: Mon, 24 Oct 2016 11:59: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