From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0041.outbound.protection.outlook.com [104.47.36.41]) by dpdk.org (Postfix) with ESMTP id 81264BB74 for ; Thu, 27 Oct 2016 17:18:12 +0200 (CEST) Received: from BN3PR0301CA0044.namprd03.prod.outlook.com (10.160.152.140) by CY1PR0301MB1627.namprd03.prod.outlook.com (10.162.166.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.669.16; Thu, 27 Oct 2016 15:18:10 +0000 Received: from BY2FFO11FD028.protection.gbl (2a01:111:f400:7c0c::135) by BN3PR0301CA0044.outlook.office365.com (2a01:111:e400:401e::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.693.12 via Frontend Transport; Thu, 27 Oct 2016 15:18:10 +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 BY2FFO11FD028.mail.protection.outlook.com (10.1.15.217) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.679.5 via Frontend Transport; Thu, 27 Oct 2016 15:18:09 +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 u9RFGIfm027183; Thu, 27 Oct 2016 08:18:06 -0700 From: Shreyansh Jain To: Date: Thu, 27 Oct 2016 20:47:44 +0530 Message-ID: <1477581467-12588-19-git-send-email-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1477581467-12588-1-git-send-email-shreyansh.jain@nxp.com> References: <1477310380-17944-1-git-send-email-shreyansh.jain@nxp.com> <1477581467-12588-1-git-send-email-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131220550899482879; (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)(11100500001)(77096005)(50226002)(104016004)(5003940100001)(68736007)(6666003)(47776003)(85426001)(305945005)(7846002)(8676002)(81156014)(586003)(110136003)(81166006)(50466002)(86362001)(8936002)(48376002)(97736004)(6916009)(87936001)(356003)(5660300001)(19580405001)(189998001)(105606002)(2906002)(92566002)(106466001)(229853001)(2950100002)(4326007)(19580395003)(33646002)(50986999)(626004)(2351001)(76176999)(36756003)(8666005)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0301MB1627; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD028; 1:tA2bfuRJwUWymfyvRkeudCO1Kmz9A5JDKAvYsskhmNEu5APQJxxPF72CQpGOfomO4XqxlwNIn16niE1Ek+hcZP2frRj4Y0VmDbjYVC4tylVUxf+HOeukaADggiQ5E0SwVo5yJyQDHKoMbhwG2WvUwn+bBzHmQuFCWWosUwQ3FjTcc1YPJBOS8P4nC5Lh64j9IYIUn4l7r6QvyikYZb5OLP5WR90xtpuD7QyO9rGZwd5i3dLzd/jhW9DoONG9oVd+5W3mIrYZ3UARPmSTr3vJtifSmafEs2d0xbceIxBv/1vMi3vbWny9oR+WcuD4HBsc6OfoXHuo0w/0fdAaOi/yXXIXJeg0XfKgGzzIe/d5C6mo1BrxBiR8fUglM1OBc8wNmemqf3SPHfZno4MyT9mIXzSnJ8PDNc3W2d177FjBqehDZZjTHAxE8V7T4+FUZ6pEWYdDo/sNqEMzGpCJ5QnGbEzk+vK0ZVlpeLRzYzAOtPVJ13pdHqOoKZONIzTuHUk6OsPT6Jgq9N87m7Uu9YhJqG6OxQd7+yaI0jH2mAxydzYKdaVdTG40w1XyMeTifpeLBF/4Z6++JZ/zSkRuTkbBokO5zUSe/J9ER/Mi6Aqx/cCcdtW4nOzGkC30E1V2TkT4IFBuIDwd4gZdV4khNpXDXedz4g299HSVbuRT+BfRYqnZ91eXe65h67K5/16MCc7Q058nxgw8IYmeN3KvXpOWL/nzNDBlPxENqhR9UTTWo0w= MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: e1482137-f6a1-41af-a56b-08d3fe7c75df X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB1627; 2:nvP90t0uaWvbIxuO2i5JM/gGmvCjCw8CrtH2fNtAg+d1I1ap5K0JA+3MmKbBgAX6slaqhQfzENoARe5Y2BaB2pnKYDTBAt2ZEnTPN2S+iKEHDgd70DY8kuSIixN3oBH2pbWLhO6C2i52KVujXc5wGumjxglpLzU6tsmWGc3Ejf/UfxnenJpqVKQWuLGM1qZzt6AbS1bM+ZKCS1d9PAqzMg==; 3:1YxRcUOGC8KLOpnTe0Dtmu9+JIFz94UU/seGc2L28Ufrsh7AkaEWlFzVTMC3pN9iI2TJYVcldh/jxhrLyZNx75/4QCXkfWtjNB31fDXLDwnygBjK55nm6aRjzoG4BKqoCjOHIj7y5Ap6u6sMUBJcksjFicSYB83+mo9RykviTrBEyJJAh6gtp5VdmqGHHQUly5IA6Yn5XILe3Dh4owAeE/55QiYJXJBqpmx7rm4jagWHsm8iArc07XPU0Mn80kz8 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0301MB1627; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB1627; 25:S+nPKSJO6X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oJ6O1nIvU4izLDYgh4SUCnzuoENKAkuG7rVZ1B5HULDNZ3UNhLe8GA==; 4:0dbLQQ6RUSQs8jiL/XWEzHFLJi1AZs4SxdRtO2UvfkXO0eXkqeCx9q+fbYbyqsxAf8Ua9KkMCPc1E6nQttgVA67d4Vi3KQ4w2d910xDJPNdHYa0pGlhu2MK0B/oyHPGb3ZGq4dtQCBepr0+t6eoC4oBKpFXDDXfIEHl96e4/nej8zcVl0rsndNNLQ7925LO9h0pWd4WxXCX4IAfyafsBlKzZo1DT2ERFe/WRX+XT0Wf5sXTrsVags/nH2dFGordDm7G02kXjBEXnkLw1Y+QHYwngkhhAXCl7mEniZTsE8ClQSma1UpbzqQMogDJYs4Q1tEZVZBQp4R0pzE/LwkO4D2fTu5Z2fHl+TVkbmiQfVAoCgps6fn0vUxjazwHIJxHNsc+5Z/mnnwBYWNVzf2KMnQmon4B6DmSuoIh+IVGvfVpBAqec1OTddX2h2f7a2F2DbP8BCdLtGJEFlJMTZPI+GRhBoPhkoTtN6XxP+QBHqvJSHUZ8x5laVvJN58T6Sre/we5qTzD9KDQCZM+vACUMcrgD1/ljQW130wBZtrhK6eETSx84Is2QWhl97P+8aZFn 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)(5005006)(8121501046)(13017025)(13024025)(13018025)(13015025)(10201501046)(3002001)(6055026); SRVR:CY1PR0301MB1627; BCL:0; PCL:0; RULEID:(400006); SRVR:CY1PR0301MB1627; X-Forefront-PRVS: 0108A997B2 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0301MB1627; 23:cejtZSwSRXn610sMHmW8WtRsY+9nZaX1+SdKp3Z?= =?us-ascii?Q?yMX54vMxx0du6I6AAHOwT0vhfCxTVnCgaZRmaVzVUs+ZfT9CPUTqSoHjyFrC?= =?us-ascii?Q?5w4SlNACxMXNtr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SP5Z?= =?us-ascii?Q?AZlkt8VI4GEWtY+BzX4K26z+elMCNIVgybaRwX1FRqxvvOhA2rHyD479HnJL?= =?us-ascii?Q?Tn0z1LEvr0EIAQqVGe+h6BDdGmtJ1TIDZRae2g7CDiATnsKKaxE4tunsYSVy?= =?us-ascii?Q?sCc29XavwIRlTuBP2WRyW3Z1cQNQQC/xMqW9R8K8oEKJuG2mz+C9iKUqnTx4?= =?us-ascii?Q?l45WwvgIIfy3QJUt/SoGlDYT8SXEbH8oRe+O+?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB1627; 6:X0+mtUx9AOUy7tRxO9wP4AnkkJMfamar2BcrTzRheUmMmLXOd6KticXkzoJk2COGqNML4gLuTZSJRe1hNBCnhsvzNhG7hOd5wdoUZB7/kM4qRWIj4wMr14BilnoPVEcK0uQ15UgcM5rGJEQM0nj4qmzU8SvxMJtuM1CyiImIxkUXTl9gVgtNTsa0C/bfsNWyPS6w1N/JJ74fjuW7537z7fQX3uP3mqUbnfuLHcsuUmxsRXDJza3tQfgsZGSL1N6ZWM+DmaPTsCAkToCc+yy2A96iXT/rJ+Bey60OEkMaCfZxyNvCqeao6I4MYW0JNxEW; 5:mxE9qHGbYiZSRnXOhqNAeb6HpUZOLrMXidd5kQZyRvjN4gaUDN0sPD9UUtL0jv+lwrD2KGo0rKwd3htzHQnTVDHIC30isQ8QzTMahO8wnj3F6Wi3JD4L2aHHy2IzK8Sjto5lWQluR+p5PYGGxeETQEFJMzrnsieSBiuVMwqzrKV/8eH2kY+0eJQnNT3MCXw0; 24:tuDIr0W++folSIoEzV4eww+l0BudOSkaaKYeCNN5O5ag5/Mnr7Kwno+a3uEFGk8iUb+MTybdBK8bzYBLFUJ4I7ESIsx1uRXVyfWZQWjnJP4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB1627; 7:XPYo1SncyvU+4q5or1fnP+XmYDxtcITNABicUCFi6Pceov0kQd5SqN/PheEockz3I8Iv7jwLbKJ7CoiKHeQh/l4GkJZQWR52riA6uCc7rrSV7g4vTZbDOjrQeuLP5jDF/qXzPHdow6hkYg7ySUpS7wsy2p9Pg8R4ejANP3b0GJ6FzlcTfTNzV3zo3KE7U2LmPW4IbIKJrC3JfGwcmVEZ5D/hImIYHPs008d03Gx4IMfcnzXMBHuTqIElF2ddl4zlDiZrhkapMfHnoLeecQ33Vf3dzg14w5HKdLRK+mVPC8zZMHN/3QOJ7QNmnwu1U8J0lPyB1dleZ8QwvaDQt+7mX0xW2uprEyrCyO7wb2kXNCk= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Oct 2016 15:18:09.3242 (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: CY1PR0301MB1627 Cc: Shreyansh Jain , thomas.monjalon@6wind.com, viktorin@rehivetech.com Subject: [dpdk-dev] [PATCH v6 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: Thu, 27 Oct 2016 15:18:13 -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