From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0057.outbound.protection.outlook.com [104.47.38.57]) by dpdk.org (Postfix) with ESMTP id 7F18037B8 for ; Thu, 10 Nov 2016 09:39:52 +0100 (CET) Received: from BN3PR0301CA0083.namprd03.prod.outlook.com (10.160.152.179) by CY4PR03MB2886.namprd03.prod.outlook.com (10.175.116.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.721.10; Thu, 10 Nov 2016 08:39:51 +0000 Received: from BN1BFFO11FD001.protection.gbl (2a01:111:f400:7c10::1:114) by BN3PR0301CA0083.outlook.office365.com (2a01:111:e400:401e::51) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.707.6 via Frontend Transport; Thu, 10 Nov 2016 08:39:51 +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 BN1BFFO11FD001.mail.protection.outlook.com (10.58.144.64) 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 08:39:50 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:; UpperCasedChecksum:; SizeAsReceived:922; 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 uAA8dmhE010058; Thu, 10 Nov 2016 01:39:48 -0700 To: Thomas Monjalon , Jianbo Liu References: <26890399.yRKBLeyzpS@xps13> CC: , David Marchand From: Shreyansh Jain Message-ID: Date: Thu, 10 Nov 2016 14:12:07 +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: <26890399.yRKBLeyzpS@xps13> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-IncomingHeaderCount: 13 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131232407911760518; (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)(377454003)(199003)(377424004)(24454002)(50466002)(104016004)(36756003)(106466001)(86362001)(31696002)(2906002)(4001150100001)(7846002)(77096005)(68736007)(356003)(305945005)(64126003)(50986999)(76176999)(54356999)(92566002)(81166006)(81156014)(8936002)(189998001)(4001350100001)(230700001)(33646002)(97736004)(5001770100001)(229853002)(23746002)(65826007)(87936001)(47776003)(65956001)(65806001)(31686004)(8676002)(2950100002)(4326007)(626004)(6666003)(105606002)(5660300001)(586003)(83506001)(85426001)(21314002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR03MB2886; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD001; 1:ZiMGiw98JZrgFMAE2V2q37glod5riSQZFr1HOe4jqsugbEA8ZBllb5yZ86oxyJNfnleTjDyfK73OPoKIO9SGdm9Y81kOfFXIn1bvC7WK31LfP8bzQW971CCf6Q2ALQkjVL0aYq3aoORyEF5UY5bNNF1yydUoTnaZ1WcH7eKXL4idR17hAYyuV7uXQNXbuGV/iA/m4qL3hRpaJ0CCXMblTfQNMXIziV/cbnD7xwzVgNTsvBEfz0F32UrB5BZV+KAUftRPfwSbWhEaqWe6ANhP4nUlEwFrPfCSZ5nz50W3aVczGF3nrDfBoF44l8mUYKOq41uLGs64oDPxYifUXewUcCVpe85F2zlBfaAQ+ySoUMkzTdq7i1z8/c9FmyzANF2KgYu240BYGDg+NfcpBYiiKBEvG3RhLxhttyiYYxOfIMsdUarrJ1v8Gm+8JkflPjC28BafythTd/KewkyFiU8PJTZeygIPxlc3U1wxcxX+rLfIxvuFOUpDMD5A34E5FNNRgXdXXVfa/oJkSSC3l4YjsoMvnJeSU1UpwqMLoQH4OweEsOVOCwdVcGBHB9NDUgSvuHZcveCBKWZcpfoVMLIB4bND/tt9ahYgBTI/+aTgF1U= X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2886; 2:BwWRAkfVMjAQxD5KwokOw2GRBEGAvCOa5NYHGNHO7Ws9qhT7GrtFBdOt8TBvBzKLm8n4hMM0pnnLYcG5Px49MZ4YZfkFtXjJUL4pOeKrYSMdCOfY1YlnOfZGWHTl1ep/zhcY2jt2mUE1cLs2NfaMXBkD2Gm9RJjRwEtG7TOEFt0=; 3:Mfnfl509C18Qs0q5dzhb19Si3ovjFZiwdelHr9TvAsnXFNiW0BTikiZ7xIDaMM685U8K1kRqwGN+aLB1ysnQWU4EA3FdTsJRaHJh+o7C68XhTkSM3zGUcWOgnav1gs4qL7tBxi5fnkpt2w5un/d2uA2MM9FwGztoSXOeTEk+HMb+aGGuvc2Ka0DEOQylQ6e9Kc5VhLPmtISW8oj1K9xD/+fOPCp685L6zhRESFVJVD5yW0DMn76So+6yiOpGxyaFWSSGNg1OrAZ8qak5gJ8fKw== X-MS-Office365-Filtering-Correlation-Id: b9aadb88-15a4-4b25-2125-08d40945230e X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:CY4PR03MB2886; X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2886; 25:vtcGUpq3r6jJE+XDTTxgbKb9JBYDhT1yxd8W8WpHUp4dSGxcRXPLx3BgyaRfruDcop3/WDH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yfd/ZMZ79iUfW46k1+16lZ9H8ocJccPqXbjPftjK/ow1yRAkMqn2zFTqFsU1+v83lplCWRnBNvtOHd1UaqBLucMn+QbuuuCbZJoFMUVXcLOc3AzGlW6CpDl4EFYHBGSY3NwhqIPiUSNF21ktrEUcwBR1CO8EcUk6EdYXUtc8hNxyBeBrdFD3lwD7JDSJUCAw0l54LwTCK2hbdgSFa55cdof3ao3blE7G96mA4HJNjzX3lLzmKEgNwmprr0yy4vID8zxcHxtcxboIkbscwNdvXy5+2wI+VLYXbVuE4J3zpdOLV1jBtlJGUD3fmp9xyK6pY7A5aywCDWAhd3nomxqJ0f7qN703Q17erQaJmJ9EUKdo8FTg7uSpoEBuqQLmZzHuY9wE1p6XEb3q3nT8BYhEtcyJ72z536hcQZCctQTk6bFRzcnAhIFkL4eADFsUJqlqmAS/HHXlLZROHjrREbr/MGVQ8NATxS1ebpFvmt3kJ/RBjNsBkaRffHZvmWUipSuDzUzJ9osUWw4kqzjvaBiM0F9lGiY3yOWQwgTZ4RaYfHo0ej3BjnSw2Dcl456 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)(13024025)(13017025)(13015025)(13018025)(10201501046)(3002001)(6055026); SRVR:CY4PR03MB2886; BCL:0; PCL:0; RULEID:(400006); SRVR:CY4PR03MB2886; X-Forefront-PRVS: 01221E3973 X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; CY4PR03MB2886; 23:8xMdVfH4Adxu/4OSfRJxnUofh+EgMfUUahHcv?= =?Windows-1252?Q?FuHX3nW9odiL8EQe9JgtRg2sXFL/ng3Yy0+7z2Z0tDPhMyxhlcFNkLT8?= =?Windows-1252?Q?eCjUtNNAfWElhh5A9bz9xKtB8XbuIDrHzvhwvPI9suXVmMxnQZfuanVc?= =?Windows-1252?Q?I4DfhTiC0cz4BsPLRnx6GLKXTtCocUVLp6v6KMv+TX2pogbeX45OhxOX?= =?Windows-1252?Q?+tVeFDYqA0Xn3ne2TM4X4koZpY3RWgahGqvnFGBUSsqWRrmBatr/MIog?= =?Windows-1252?Q?TqPXp0M/lJt26kccTSPKr2kscaJ5faaN5blUpfZ8Xn2rQl4yNxU0bDkC?= =?Windows-1252?Q?eQWnZ2f8sf4JXfw7vMffLPeWOGYBT/rkq1IzSXpEs0iWBWNqYmJBJyTS?= =?Windows-1252?Q?GowJ26vYvbzU5Otd3msqC4ZACoiYElhEuHLW+k/DPjgP+/UeGnR4m2Tp?= =?Windows-1252?Q?wHl+3xBsWXCOm9vGJvXRI3ELqq6/hu/nlrStNZPSuRM/mB4QhJopTh3H?= =?Windows-1252?Q?JkbvUsvrezCGo5mUnP9a/hm4eo9BfoyUU3D5UTGBWKPRIJtJSWFSSAJz?= =?Windows-1252?Q?dauW14Otghgf+J5hUxmnZOLzJsby3Rnks2FIsPUbyNTmRbNzb3v7DTxG?= =?Windows-1252?Q?/KmEdKEBq3XZjFL/tHKp6EFhFIH/MVs7k6RgvMJtymmFwIWoYr8OjrTz?= =?Windows-1252?Q?deJivHbth1Dk6jLeo7kjbF2Ki0z0dc5jeNjE6NtUbuTgjM2GDYDKn/Q0?= =?Windows-1252?Q?LQZNWfMcQE2x5vNJz3ScKoCWpJPwALPLUMPk2hAFYSVLJj0CtKZTPdE5?= =?Windows-1252?Q?2YxZrnktSj4nDjdyBTOzKHfiD7JoTWbK8FiZwAxPU88ikCP8qRdd9gRX?= =?Windows-1252?Q?2uMjJtiZDbiYZD2Sv7rZmgWp8Y6iYbHf6O64X341dekdiNWT4QO9P8zt?= =?Windows-1252?Q?g5i4yPhG4ecKNJlk4sBPOBdN67R+M+uOWewamXqwxkhtI49/0ugvKyYl?= =?Windows-1252?Q?qLy4qeo71/Ow0OBbbCBh0DSOtIfhKJ3Ddq94szYZLB0rZeyQM8B6wrCX?= =?Windows-1252?Q?TmfMCo4ECJSJlZZCMx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kv6OIUWdVp/5SQw1E67fBrI++M+/PUFOGqOGlZFdlfkkm/RWBDOtMhq4fuxo4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2886; 7:CMe9TTrihLeDAawsJX/QNzWv5N9JXMi6gQAdf7ju+S0/MuWteKIaMiUzxrX3+nd5CwY6r+jRs6h+pS859Lwp3VizmyAqepO2vSSC6rcxfjqu82obtCrOm5+0ggD6/mgawVuQl59nba7T+oLkJhuK/yzszhvC6QFS+cTAmqAHI7FMMW1RlKjs1I39aKxMFYJuLTEfYFIMqmPWi8mXVa2l2GkMYD4fGCXzB6Fv6lO9QPFzUQcpdHCCm8LrAQK2YkJCk+aSNCRbl95LJcvfvbsVyYIAFeHcYCHu6hJNcjOa6KZDgyyYEiTvrZpEtLSt+Nm4c9dhaDNIWecdd34X9/doHW/GjwSXhmZHhLN3kAvvabc= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2016 08:39:50.9888 (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: CY4PR03MB2886 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 08:39:53 -0000 On Thursday 10 November 2016 01:33 PM, Thomas Monjalon wrote: > 2016-11-10 15:51, Jianbo Liu: >> On 10 November 2016 at 15:26, Shreyansh Jain wrote: >>> 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? >>> >> >> How do you know eth_driver->p is pointing to a rte_pci_driver or rte_soc_driver? >> Maybe you need to add a type/flag in rte_driver. > > Why do you need any bus information at ethdev level? > AFAIK, we don't need it. Above text is not stating anything on that grounds either, I think. Isn't it? - Shreyansh