From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0055.outbound.protection.outlook.com [104.47.33.55]) by dpdk.org (Postfix) with ESMTP id 93EDB3794 for ; Thu, 10 Nov 2016 12:03:23 +0100 (CET) Received: from CY4PR03CA0023.namprd03.prod.outlook.com (10.168.162.33) by BN6PR03MB2884.namprd03.prod.outlook.com (10.175.125.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.707.6; Thu, 10 Nov 2016 11:03:20 +0000 Received: from BL2FFO11FD045.protection.gbl (2a01:111:f400:7c09::169) by CY4PR03CA0023.outlook.office365.com (2603:10b6:903:33::33) 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, 10 Nov 2016 11:03:20 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) 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.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 BL2FFO11FD045.mail.protection.outlook.com (10.173.161.207) 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 11:03:20 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:; UpperCasedChecksum:; SizeAsReceived:853; Count:13 Received: from [10.232.14.87] ([10.232.14.87]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id uAAB3Hx9006041; Thu, 10 Nov 2016 04:03:18 -0700 To: David Marchand References: CC: "dev@dpdk.org" From: Shreyansh Jain Message-ID: <86ece536-1574-6d84-661e-9b9e77180344@nxp.com> Date: Thu, 10 Nov 2016 16:35:37 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-IncomingHeaderCount: 13 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131232494005046318; (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)(377454003)(24454002)(189002)(199003)(47776003)(15395725005)(23676002)(626004)(2906002)(4001350100001)(65956001)(65806001)(50986999)(36756003)(92566002)(85426001)(83506001)(87936001)(65826007)(5660300001)(2950100002)(4326007)(229853002)(6916009)(97736004)(8936002)(110136003)(64126003)(50466002)(6666003)(189998001)(86362001)(31686004)(104016004)(54356999)(81166006)(76176999)(33646002)(81156014)(8676002)(106466001)(31696002)(230700001)(105606002)(77096005)(68736007)(7846002)(305945005)(586003)(356003); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR03MB2884; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD045; 1:C56iMRTjNhgB5mfSIwGTegALXAXR/jRA9N5jw55tykJTEtSzUAnlb2jtcOMs9IQfdoa1s0pWe9Idm9qFEntrlP5fjMMX4CkDjJhAad+4IYSA4MINXfHEPivOyibl0FKQ0NIjgXTXM+sXsE0utPXk9jt1S0kT/r2yELorzYcnThbmSYAXzXDarEvDEQjr/AbKFyzL4mhQKh5pprj9ckJC9P/WE5xeygBeGXtvE2HVLP1Ky2mg7qVKxq5L5/8bGR16UxLms8pFmG1vcmyrYL3TXdkVAjecFFClzJ+5x7t1hFBGbtSeTAnHV4HhK35Nnp3Q7Tp28ye5J1qGAT5/esHTLbvC+Z3Ezcu1JGEsyhTQmz0Dj0TFKe9Rj1pYhPuyLKYiKGJ0WNyx6WT2JrQRSz7E8EvUUwZZzJ8RSqzXnu2BdkjEpIV//Te6cDXmWaZ7WKeBrhuWPEakyEdDMrBTxdqmmDpl2/oRnu6GTo9fRvkE6vqKQF67Ce13sJamAfcMKdh4IvjXluJvuYxGKGfKFi+vWY1JLaLp0FP7DEhz7uCJVU3lanHhAKYWZr0Yt9dhOXcav7pCGmMHcNKguJFfD3rsPulkw9trSIlAvk3cySJpEGw= X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2884; 2:7Jb9dZCgfnBM1Dh3/gQtOnMbiDT3JZbSv8k/iSmD2+bevpXB8qB2N54Gc/al7/5yi8Lkfl9LXgkdFxdLtUpPjf4w+UNrkeDr1RDuxXcd1C7xybJwm5pnKZEnhGowp3SHGiGLv6B+BUGxPlpIt3vV78NS1BJPWsLUi3F/N50RABU=; 3:DBUrZEU8tkEwnZNRaOqAxfUqFCFNEdDZIPVGwDWobQViiT4M8cYrDFLQTiFbhGGCydRz9hNQYEGanNrYQpe/HTPxa2Iz48UKjKsKX0mbxv+w5TrEH71LLX8B+2ybR6WOGdk7LCQSH/qkAVgvRGAIzba1uBPe9daaiPtn1epj+45bF/13gPOwKWz0pKP8S0NgvmbehR6OUjOmOy63tqFCiR3VnpjSGRlpz5gKPWWQ7S4Ywc7DA6EBm9rCrQa3JKDtdDQG51mvN8fJ1UzNNd7y6w== X-MS-Office365-Filtering-Correlation-Id: 0fc94c60-a52c-4ca8-cc2e-08d409592e9f X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:BN6PR03MB2884; X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2884; 25:4bCYkjXaq4jArFEhkMvD05Crt6HkOyZUW8vZRvOD4KhL+KpL6Zf2oNHmzfzLQc0fqJIPccTd+DZiSlA3WuPP/MWlD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FIkZCsFplb5xHn/j38/8J3A5MUDpEM4ldxTHmfsnsRXCiLIJcICFIN0Q==; 4:RfpaqIjSTP97gokxnLr6CWlxFtq2AKjZXzUc1I9YWXDBKQRX9B4BaqJjFYsBiDDHkIU1Oy/YMsN8DFNCTt97w/9ibFgz7Uasw6F/OgdAOD+KcR+k4U+guorHe8XX+Q1rB+c72qF34aVExqkpaDaUYt8qJp48bqhgIdjyugNfXUvVPdWfiuAMzVAITXUF3W9ZOe6P64zmndwasv8OWaLGMJ20Kvg3/gHXyP+9qafipwO4tvbvfDVlVcyUA/m4HwBeAYrKj/GgUFxYV/wpzV9G69ICafqjKJscu1vPH2JkFfJ/9ur4+mHCu+dy4irQoNHS/RPcD+5He/yAd1cJrh4zJUW2KaVYBLyT0HlIfCNsFRXcWkvT4PGtNhNeWaOqp67cFFReGYCyEbNzPI7nuTJpEJ+20ByZ6K9JM72C9mkm7wF3jmu4EYc2xvr2jsJHg4QrInOcB60c8WwH7IDu7ApH0zDqsBfiZakoyMxNjA9vMTGJsxrj6/DB1tfuqGNl6Ccjx6VODbCycJY1ureaulKiY9mWT/N3eOhgX7IuUtlxQ910uEAAceU9pUw5ozq0ufsV 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)(13018025)(13024025)(13023025)(13015025)(13017025)(5005006)(8121501046)(10201501046)(3002001)(6055026); SRVR:BN6PR03MB2884; BCL:0; PCL:0; RULEID:(400006); SRVR:BN6PR03MB2884; X-Forefront-PRVS: 01221E3973 X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTjZQUjAzTUIyODg0OzIzOjFXZ0JBa1pSR3htcXNJeHQ2dkpiN0g4WnRt?= =?utf-8?B?T05iN01OcjN2MUdSc3BzYTVBeDlVTVpDd01RYkdaRHpTNlJSRXNYYW9FY3pN?= =?utf-8?B?VzM3WVFCV3pJWW5UVkVQRTh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7Sbci7mgX+JKY39OHwtNWQQ+dUAHr02tON5VhVcZ3RqVsYSEJ6BtgXrszKmVnX7XU/zBBeOZym47NlNEoewr9IMBKEa4rH1QuVYWrM2FSF4iufuUwAxnJekk+xD4qAH7v2VyEsuY0Qb7P9bnvJkxDe48wGasdXbhR750Ux/4ehA2At8Ndob9gdaJJAV; 5:tYcX4/+kmrX+q2ZKWrATkXVzM2HUtQsFjKuHKMH/jor7m/6WO8xFiPkQXR9KiLOdqXEchkL/UjzINh794pf7m9apwxq1BPbk9YLV24cm3OCmxzWpGjsAwz4uOk864gNX4xt4n6aexq9bRJTeq43OzVhn5EPAl8fl1XS0nGk1JSuNsE1W6iGX24Y8XpbntgRi; 24:lYP5JZ3p2nKyzr8vxUryqBX2iLYsLt7sU/tm7PNUwN464dyuF2vhIefk0IDKCxKkTbI8fN2xmliRvEmpsF77iw+wk0r80b6cnz8+eBF0eNg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2884; 7:TrJa+beczprYTSPBt+r4q4gHaXnpsPdUkWL1zEF03hmhCLKHTBzf7Tp0nGz9FuiDADrFARXI2PV6ZnLOWtKmZqeEF2Ug5Z9G8hQtGINlrlU+Pj8hhY2c74Id4GQbwPYM/Uo6WPXWKPO0Tfx+MZN5XGKhfMn/CodFEsfocCa1bzpQNL9h7iXmRElEgybOVI29WawWdFilDLvtOrer7i9QWNhadUWhGb4OibgUC6Jv68PvPm3/3idn9SsKn3LMz1FrIiACVvJOhOhTEbJ65qQcjiRse5Qms2hDuArWRYRJrTe6rhyHr32fw1KRWIPDRVw++jume+3Oj2Ul1NsuWTE4rMtepS1G/os+mB0qo2CByXE= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2016 11:03:20.3174 (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: BN6PR03MB2884 Subject: Re: [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 11:03:24 -0000 Hello David, On Thursday 10 November 2016 01:46 PM, David Marchand wrote: > Hello Shreyansh, > > On Thu, Nov 10, 2016 at 8:26 AM, Shreyansh Jain wrote: >> 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. > > Do we really need to keep a eth_driver ? No. As you have rightly mentioned below (as well as in your Jan'16 post), it is a mere convenience. > As far as I can see, it is only a convenient wrapper for existing pci > drivers, but in the end it is just a pci_driver with ethdev context in > it that could be pushed to each existing driver. Indeed. My problem (or lack of understanding) is that all PMDs rely on it and I don't know in what all pattern they have envisioned using this model of ethdev->pci_dev, the initialization sequences. rte_device->init/uninit would settle most of those worries, I think. > > In my initial description > http://dpdk.org/ml/archives/dev/2016-January/031390.html, what I had > in mind was only having a rte_eth_device pointing to a generic > rte_device. Though I had read it (during the rte_device/driver series) but didn't remember it while posting this. I agree with your point of doing away with eth_driver. > If we need to invoke some generic driver ops from ethdev (I can only > see the ethdev hotplug api, maybe I missed something), then we would > go through rte_eth_device -> rte_device -> rte_driver. Agree with you. > The rte_driver keeps its own bus/private logic in its code, and no > need to expose a type. Agree. > > >> 3. Similarly, rte_eth_dev has rte_pci_device which should be replaced with >> rte_device. > > Yes, that's the main change for me. Indeed. This is a big change. It impacts a lot of EAL code. > > > Thanks. > Intent of this email was to know if I am missing something in assuming that eth_driver is actually not being used much. I will keep the comments from your email in mind while making changes. Thanks. _ Shreyansh