From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0059.outbound.protection.outlook.com [104.47.32.59]) by dpdk.org (Postfix) with ESMTP id 163E1BB20 for ; Fri, 28 Oct 2016 14:31:15 +0200 (CEST) Received: from BN6PR03CA0023.namprd03.prod.outlook.com (10.168.230.161) by CO2PR03MB2374.namprd03.prod.outlook.com (10.166.93.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.679.12; Fri, 28 Oct 2016 12:31:14 +0000 Received: from BN1BFFO11FD002.protection.gbl (2a01:111:f400:7c10::1:148) by BN6PR03CA0023.outlook.office365.com (2603:10b6:404:23::33) 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; Fri, 28 Oct 2016 12:31:13 +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 BN1BFFO11FD002.mail.protection.outlook.com (10.58.144.65) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.679.5 via Frontend Transport; Fri, 28 Oct 2016 12:31:13 +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 u9SCPEMU019399; Fri, 28 Oct 2016 05:31:10 -0700 From: Shreyansh Jain To: Date: Fri, 28 Oct 2016 17:56:35 +0530 Message-ID: <1477657598-826-19-git-send-email-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1477657598-826-1-git-send-email-shreyansh.jain@nxp.com> References: <1477581467-12588-1-git-send-email-shreyansh.jain@nxp.com> <1477657598-826-1-git-send-email-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131221314732973646; (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)(1110001)(1109001)(339900001)(199003)(189002)(19580405001)(19580395003)(50226002)(356003)(8936002)(48376002)(110136003)(586003)(68736007)(5660300001)(97736004)(85426001)(104016004)(50466002)(7846002)(87936001)(2950100002)(6916009)(33646002)(8666005)(81166006)(305945005)(81156014)(105606002)(2906002)(92566002)(5003940100001)(6666003)(106466001)(11100500001)(47776003)(86362001)(2351001)(4326007)(229853001)(189998001)(8676002)(36756003)(77096005)(626004)(76176999)(50986999)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR03MB2374; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD002; 1:AiJAKQlJ7omW3Y8qe0/c/zc0ej706BDW/yPLMHKg7YXDt69cMD76zsoCuHL7AQX12pURAqQj8i7i4ggFznNUD+tR1X3LZHavRZHE6FkHcXKLm2jlhFVq4bi0lxdIZLemE6red13kUSeWL2HDmJPfQzTQSFl0ychN1GBwU2waQi3nzFLNgbV/bzLr2dXGtETovWktE3Z0ASvcrMJxyocP1YMsMxZ8/DV4Bif8csieZRBDWem5Orcf7n3jCzTNkEfF8KlJxvdCuadQhlqpKcdGEeq/JKUFiTi+VeAGzrnM5tRlOf8fgFSSEZHK3/1olcbuwEvx3nUI/eGOEPetT6o9D1qZvcdFLEnCSD/s3iRLT2OGfuGCNmihrDaipfRTZF57/tnQoaf0WVmeFfnrhCpgmqjGHB6Qv30Fm2xKCFZDfXl9HQxjR+H3FnTWyFt01A2/K0BDuhl0uthmeV35KbpzmagajAkQh3XK2WheI07KI/Rcw2MV+5pxdRsxpjntwNwoUYB3YtgeJSJdxdKBVZkeC8+x41LTs23ckiehnfmqC+w5zma2S7uW2LzvBi/CDpgMVjm8dpuLGxIJy1NAt4unhIaDBYwagttLHx6DT5GSloTKlbjIUtW5RAJiO4PhbC7RyAwYjstn8l0h5f0UqPM3ssQfX4kdx36zppTvVk4fQ23x1S0Uuxxcps+pZCQ0JfWhKQ3qgAOgItEwnVCnhFoBjLrSL/udyY8EaafZ2aDTpOI= MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 7b748491-507b-45d5-fced-08d3ff2e4e12 X-Microsoft-Exchange-Diagnostics: 1; CO2PR03MB2374; 2:McFdK91IsLS4cJ1ul5QUP7lmyfQpUU/+Ot+dYKLKJHx6eRA22KcA/MMNEsspFZChcuWBG+0u0Q8NrTPanCmXR40bvfnhy9a9fapJdl3siVYHwrB/kJN3vbmFb6NVKIzjRWwu1INmf3PQHpMZQ3BjmdgUtSpp/flvDj5VNxlXCJq+c3/Pf5yoN/FuNHPzyvf7fRBPe+Zg5wbkJ/8x7SUrzg==; 3:+anpcgOxud4LQcGn58NpOW/mTjtpf5J/Ly1LjBCCTV8G/yrlaFL3j1xTTwlyf3+dxWgseo8ApXcxcepIYYeK0qYEic+WwhuJQoOrz8Uwc95TKlchrs4sJfxxNNE26YUbE8PD4AQS9pZBQgy+iot1QEzkCBdbEcrB1Dch2HrECcxcUVgZaOzErdTD3zW3VOfSUDhqM3j0+Iep6aii+FBts/akmxZfVch1basC/bDMTb91e7qNx8HllctMj6q9b2Ny; 25:JS4CVEHQUMmSXuQZQ6svgCHdhfbMeUEg7A34y6BtWS+Frn4c51sf8QRmriV2s4hI+HMR/Yl3xoRRwPiqOcuaxTfSeeVIDARg3cG/zwdhuTK395y5cBTtRCP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IYCqUHjZSyL3hpnMm9ZesOH5AE1EOzIBlC5rSLwHdP7eAruQ23fl1fzIukYPMVCMJJpJlenYNv1L/bBYF+mqNrXDzxbjIqdIwyQBBtUyxIXNhZUIEAKplIgRPMR10uI/WZczVLwEbpfXF6dtas+133L0UaZbiqH5uijfJcV38jsdxanOZN6rcz5hnpGz2X4L62Ij/A1BkG+diFAD6c+xs0/ttjA2tqvWM8JRuHSgfxLrC8jfqaLum0CBTW9jnDhznvOuEC 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)(5005006)(13018025)(13024025)(13015025)(13017025)(13023025)(3002001)(10201501046)(6055026); SRVR:CO2PR03MB2374; BCL:0; PCL:0; RULEID:(400006); SRVR:CO2PR03MB2374; X-Forefront-PRVS: 0109D382B0 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CO2PR03MB2374; 23:4XQ1j8Ix7tsxXrkU18eooWiM3P7yeIKsNUqSYNuPb?= =?us-ascii?Q?MZBcLnkotlFtSAwhqIOjLdocREO85/tuCcaPFwVMto0gawTW+0ww8OJNCdop?= =?us-ascii?Q?rmOBrILDTGTMvVCq4pVW/9iqOfDQkTUwGJBsa8mVzdnL8Iwsx/XzCZozl+tN?= =?us-ascii?Q?W/2R+6zeutulJNdrNApxGGft3Nq9L6ghHr3Y1EmIK4SwCHlLqGkGq4Mt0OXp?= =?us-ascii?Q?fAobutLk2KkYPhJOdoq433Toq0bMgUo7K3qZqC1yrg+BlOqMkFJj+OM7l9lp?= =?us-ascii?Q?Fv8GSvc1uaSjCoa/GLbVA9ZvVU/aALPeMB7KaspMqfs3O8sb9Gmd912rbqob?= =?us-ascii?Q?TmoHIRBOOP0RkEvcCEPYatkI5fdACYGVY9hnbLxfWe3+mtpIfBSLsb5xltD6?= =?us-ascii?Q?X+5+f9JZgF89QB1mNdPbPsUh1hfiUebrKS46teKPslQ0ZUS7yVbkyhDZXZnS?= =?us-ascii?Q?Cp13loSf9WUaATKjiW775z3kKBOCc3dNcJAuvloYobZwnZczsPKk8xxU0DYB?= =?us-ascii?Q?BBkFqDnhV9ii1xy/BOVZoD6FZF6V/pOqOHKy9Z2P1GCtWECLBKsomVDY/9og?= =?us-ascii?Q?Qo8K+8AhUYn/+il5UIsKiP+OgP90sZHGdzWw9a5E82ZLcWLYP9FelZxb4bPp?= =?us-ascii?Q?cbKvyfo2+8gehve713/tvbCr+bfvy6MM6hjE7c4TLmLyVg8itEC2TIqXmBrZ?= =?us-ascii?Q?mnT8I9YRe/E5WlDApynj2BtEjzdz4XTR1f3EAAnQKfp6NcZoUcVHbtcpwafw?= =?us-ascii?Q?JQZxRcLb5HOA/UF8ha4d8OpG5vEmbvf5cr7+N1JYS4323AXi8r8FXW2ebyV1?= =?us-ascii?Q?ky+UZTwjoaFlmxFckUg6U/fZdql32+hXdD/OKzgVOmIybHE9rcWuH0LFjT3k?= =?us-ascii?Q?oCB8LNWsTcyKzJ+N7C4Fvk+oHAFYrxFOPGjHl8trNIPZAr74myIyf++YWFaW?= =?us-ascii?Q?cbGKtms36DOTC9NELMdiX1A26O0KUvtrWiVOCrCL+h93NrDSndX989zeZf3T?= =?us-ascii?Q?yJ3kURu2L/bpzsvtanJs78Hl3RdbWrVNfHUkoWGSmW2UiuaHLDq+WElWfwsL?= =?us-ascii?Q?qmuUYtb5T1b3oj3ixP8IrNsSPzOe564gZk6sfFUy/rhDMDKKu4+3cdHESkgM?= =?us-ascii?Q?FivCPMLmQDKP/EKMoKFZIJ8IHxiLXefhC970AdVWIqyvN6bG1uynf7BXLr8n?= =?us-ascii?Q?t8VEt2Ix5k4FqEp6mtXwlDHvAzE+BMK/YeV?= X-Microsoft-Exchange-Diagnostics: 1; CO2PR03MB2374; 6:AI/eqYpMH1YYvyTxqU31UKxaAF3xIJKxrUX1dT1pLnbTOz2OTleqcAXPQJpwf8JXYrogOSDQvsU52zU8kRDRdOIKIzHh2mLJyCAv0jizm/BGvQ5jkJKX08s36xKAMQZv9/dIukeJlbVpztj783lXEb7UcoFWzhioTG3q5CMaN3PcWIA1V1q50Re8oZv6d554LEKmx9hPf2rRCZbjFWHW/ktAillHdYODovbg72ezKmj6g822NMgyDoczmHiVMXInELqfCNUR9U9K30xXmur+VbjSxZZYxSKMqQ6gWnZU9cHqw1n1W5VO/3X5Tw8gHQpj; 5:RTm83mRCHurEGWZ/WUNILXdSPTxha2MUrmuQPyY4CmpPfvqwki3AO7IWfoTyvVKU/9GGuiQbW/uKe0so44kekj8hLpzxOa9d3G4t0s6/WVLqezqnULeB4YKxdf6qkl3qfO+cqsK6B2lHNvvXSCgHmPQ8AnhSX36d2UT73NFK/WKqRKAWWm3hoo9M577kmxKL; 24:gHfwMv3OCGErze9Nmxb5zGoljolwzyCVdloaOm7wRlePn/0B/Jy+t2+RTLnc81gAunZvRLQJcLDtuT3SdizppL6YJ+tqmkeo1+yGf4UmzYo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CO2PR03MB2374; 7:oh+CdkOxJIHePSEOHwDn6eeBxQ7I7qXm9gQVLOFSgJJyr4hOey6p8UUPWGXLO9vbzWxiv176DxMZuYB6Va3z2FHy9/ASCvfmKGk2VmibOBap30DA1YXho3KI2PHgfEtVq0kMr3K+jvmLkXHMFxmzxUsNeZBEM1CVZglwVpdUv8XnffqZHPcd4kLbL7AqgpKiPHkntmURyPi+KyG3eURQcPcKYvbtrUXXIMky/DPqxDn8ljRfMk5xlqODNeZ8B5mzsgI0vbBQX/2B8YUkyHIvCa74/5V2VgWeEJ2Mnz9IN24QskvGvoOk1scctdDrYITqX5OUzzx60HUtlzUiVWS68Aicd9f6GVJyKrkgQcs0YZs= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2016 12:31:13.0945 (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: CO2PR03MB2374 Cc: Shreyansh Jain , thomas.monjalon@6wind.com, viktorin@rehivetech.com Subject: [dpdk-dev] [PATCH v7 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: Fri, 28 Oct 2016 12:31:15 -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 347c230..a1e3aaf 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -3206,6 +3206,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