From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0055.outbound.protection.outlook.com [104.47.40.55]) by dpdk.org (Postfix) with ESMTP id 47293377A for ; Thu, 10 Nov 2016 08:24:15 +0100 (CET) Received: from BLUPR0301CA0011.namprd03.prod.outlook.com (10.162.113.149) by BN6PR03MB2737.namprd03.prod.outlook.com (10.173.144.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.669.16; Thu, 10 Nov 2016 07:24:13 +0000 Received: from BY2FFO11FD022.protection.gbl (2a01:111:f400:7c0c::180) by BLUPR0301CA0011.outlook.office365.com (2a01:111:e400:5259::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.721.10 via Frontend Transport; Thu, 10 Nov 2016 07:24:13 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; 6wind.com; dkim=none (message not signed) header.d=none;6wind.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BY2FFO11FD022.mail.protection.outlook.com (10.1.15.211) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.707.3 via Frontend Transport; Thu, 10 Nov 2016 07:24:12 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:; UpperCasedChecksum:; SizeAsReceived:663; Count:12 Received: from [10.232.14.87] ([10.232.14.87]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id uAA7OAU7003779; Thu, 10 Nov 2016 00:24:11 -0700 X-Mozilla-News-Host: news://news.gmane.org:119 From: Shreyansh Jain To: CC: "dev@dpdk.org" Message-ID: Date: Thu, 10 Nov 2016 12:56:29 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-IncomingHeaderCount: 12 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131232362529377020; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.158.2; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(83506001)(8676002)(105606002)(65826007)(586003)(2906002)(189998001)(230700001)(86362001)(31696002)(64126003)(2351001)(92566002)(106466001)(110136003)(8936002)(23676002)(104016004)(77096005)(5660300001)(4326007)(626004)(81156014)(81166006)(31686004)(4001350100001)(305945005)(68736007)(7846002)(85426001)(50466002)(6666003)(6916009)(97736004)(47776003)(36756003)(65806001)(87936001)(69596002)(356003)(33646002)(50986999)(65956001)(54356999)(21314002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR03MB2737; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD022; 1:BGgDU9ObDpvzKuPR4ykkPm1mYAWSM2+rsoRWFJ48U/JEAcMes14ygN6SAzdOJUbS7bWffPORBbI3UDuBSywBNUJ+MzZU2IX1JQhABkKrdGlat4m8CLkHBRd4UCrU1DIoCFkubk4wirSTtDM26bLLeIAypDpGSQjDMqx3ZUgn1V8QqpX5gIbNwS7A8uv19eBLib3tZRiNkUcLRf9R2zrNKw654DJ9ja/Ct1aNzE5rO8EQlB7o3QOu59CGDYrDn0IqRqx3DPFPJlNN371PGaSEnKn01JnmAJ7jbZMAAvwM5YFrnHTkdHHkpqvQmetD0kTC24SDjjMHrcXdpTdao1QBjwHSvM8VpxK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lQwX54lyjSfW7jJHj6EOaQROviywCdaletiSZBuKImHobOekxE87HAM5KiRnNp642sAw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(13018025)(13024025)(13015025)(13023025)(13017025)(8121501046)(5005006)(3002001)(10201501046)(6055026); SRVR:BN6PR03MB2737; BCL:0; PCL:0; RULEID:(400006); SRVR:BN6PR03MB2737; X-Forefront-PRVS: 01221E3973 X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTjZQUjAzTUIyNzM3OzIzOlV5Sm5CQUZzV00zR3NlWlJGUE9QOTBKdk9Y?= =?utf-8?B?U2pCNmdrRlNld2VQb3R0cDhWUlg1bHhFVXlQMUR0ZW5VbitsTXNLOG5lVWto?= =?utf-8?B?cG00d1hmcnFpcDh4V1pHdGNkVHNpODlqNllicDVRTHM1SFM3SzgwZHdkYUlJ?= =?utf-8?B?bkNiK296aFh0aWk5Y1VHcDQvTDBiODlQZitzRjJtZm1HU2ljWFp0bXhkUzJJ?= =?utf-8?B?VlU5NGRRa3M0M0NFb1N3bmtmSitVdklESjkvcW5CWFlTMVZ5M1QyTEdlaWR3?= =?utf-8?B?ajFZbGlibnFFdW9vcEhpVlNOSUxMRkRLL2Z6SUZqUkROYmFkUStUZ2R0QzNJ?= =?utf-8?B?Zm1rb1M5bzBuR0ZzVkNCNTFwL3FEQWdOa2ZNUytidkV4WVVkQW12S1FjWlJP?= =?utf-8?B?STFCYUxtZzgrQ1Ayb3lNYmNmb0R0T0wwTlVDYlBvZU5mZFo0aklTYi9rTEJD?= =?utf-8?B?K2ZyQVMwZDNqYVBRYUtSQ1VTbCtab2pTUHV0b3VNbHcrdklyWmFlN2cwL3Nx?= =?utf-8?B?alRpbWhaSVRUMitHSXdtYytRSm4rTnZOdVZKWERKS0dFZlR2eFdvMUJFeVRB?= =?utf-8?B?MnJWUHd1OUlUa2hWbHUy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hhC0mum1Gs8gBIxNbDKx5MXeAzPR8nWJ5q7Ru1S9aTEzLthUU+IXME1ivInj+A+qhr56ByOcL8TxKNOhLr6qUHayZgsifFiEbR2gTW1ZzhEsSEtv20nTpcbXDHkxpqeRsz4Bi6Hz7aq4Zrkms39q7nhtc7IU+vAT0KvcFbXwGBrGPHzWaohKrPGpTUmg5AvXxyZi0CvAq5HrM9GgWOQ/pWeryCDJot51MMkpOe6yH/FWT0Kf9I8c/2ETmjWpIiCpDywtGcRbPUCGzWuPz0VBAk+l2RsZcyP+I= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2016 07:24:12.8285 (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.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR03MB2737 Subject: [dpdk-dev] Clarification for eth_driver changes 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, 10 Nov 2016 07:24:16 -0000 Hello David, list, I need some help and clarification regarding some changes I am doing to cleanup the EAL code. There are some changes which should be done for eth_driver/rte_eth_device structures: 1. most obvious, eth_driver should be renamed to rte_eth_driver. 2. eth_driver currently has rte_pci_driver embedded in it - there can be ethernet devices which are _not_ PCI - in which case, this structure should be removed. 3. Similarly, rte_eth_dev has rte_pci_device which should be replaced with rte_device. This is what the current outline of eth_driver is: +------------------------+ | eth_driver | | +---------------------+| | | rte_pci_driver || | | +------------------+|| | | | rte_driver ||| | | | name[] ||| | | | ... ||| | | +------------------+|| | | .probe || | | .remove || | | ... || | +---------------------+| | .eth_dev_init | | .eth_dev_uninit | +------------------------+ This is what I was thinking: +---------------------+ +----------------------+ | rte_pci_driver | |eth_driver | | +------------------+| _|_struct rte_driver *p | | | rte_driver <-------/ | .eth_dev_init | | | ... || | .eth_dev_uninit | | | name || +----------------------+ | | || | +------------------+| | | +---------------------+ ::Impact:: Various drivers use the rte_pci_driver embedded in the eth_driver object for device initialization. == They assume that rte_pci_driver is directly embedded and hence simply dereference. == e.g. eth_igb_dev_init() in drivers/net/e1000/igb_ethdev.c file With the above change, such drivers would have to access rte_driver and then perform container_of to obtain their respective rte_xxx_driver. == this would be useful in case there is a non-PCI driver ::Problem:: I am not sure of reason as to why eth_driver embedded rte_pci_driver in first place - other than a convenient way to define it before PCI driver registration. As all the existing PMDs are impacted - am I missing something here in making the above change? Probably, similar is the case for rte_eth_dev. - Shreyansh