From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0088.outbound.protection.outlook.com [104.47.38.88]) by dpdk.org (Postfix) with ESMTP id F0A72532C for ; Tue, 22 Nov 2016 12:19:44 +0100 (CET) Received: from BY2PR03CA052.namprd03.prod.outlook.com (10.141.249.25) by DM2PR0301MB0752.namprd03.prod.outlook.com (10.160.97.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.734.8; Tue, 22 Nov 2016 11:19:41 +0000 Received: from BY2FFO11FD002.protection.gbl (2a01:111:f400:7c0c::113) by BY2PR03CA052.outlook.office365.com (2a01:111:e400:2c5d::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.734.8 via Frontend Transport; Tue, 22 Nov 2016 11:19:40 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; infradead.org; dkim=none (message not signed) header.d=none;infradead.org; 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 BY2FFO11FD002.mail.protection.outlook.com (10.1.14.124) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.734.4 via Frontend Transport; Tue, 22 Nov 2016 11:19:40 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:; UpperCasedChecksum:; SizeAsReceived:864; 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 uAMBJb1s024271; Tue, 22 Nov 2016 04:19:38 -0700 To: Jan Blunck References: <1479747322-5774-1-git-send-email-jblunck@infradead.org> <1479747322-5774-3-git-send-email-jblunck@infradead.org> CC: , From: Shreyansh Jain Message-ID: Date: Tue, 22 Nov 2016 16:51:52 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.0 MIME-Version: 1.0 In-Reply-To: <1479747322-5774-3-git-send-email-jblunck@infradead.org> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-IncomingHeaderCount: 13 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131242871806528689; (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)(336004)(339900001)(189002)(24454002)(377454003)(199003)(189998001)(65826007)(305945005)(2906002)(110136003)(97736004)(105606002)(33646002)(356003)(87936001)(85426001)(7846002)(4001350100001)(8936002)(31696002)(6666003)(86362001)(4326007)(5660300001)(8676002)(6916009)(81156014)(2950100002)(81166006)(83506001)(230700001)(229853002)(104016004)(38730400001)(36756003)(65956001)(65806001)(626004)(23746002)(77096005)(68736007)(47776003)(50466002)(106466001)(31686004)(54356999)(76176999)(92566002)(64126003)(50986999); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR0301MB0752; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD002; 1:ntMADTDjKVeM/qWH7mZSwJPRo6XYdi23kNAPnBLQtgJ7yInVrvyGmFX5ct/rX/WI/mI/SWbLsD9DTqXoxalBCb+UiqqmzCiTu5ToH8Gnkfle7NyQc9tPrC0BAbUSf8jsvIrWYlJlZP5sVEujd0Crr7Y6zJHs9xb2zuBmjdZmLa5cpUYFhNTWYo6w5KMLCSAxir+eU9LBo4/zk0t3BRTSX1VbnliAsYmJ3k8yZ8x5r03+tDxEi+Y95YoNuJZwAGZY5OMdD6+zVzyd4PHUwgL0/IrpLI+SD96qtwtnPOM8tHz1C1moP0u+ukKDq5iF4wDybno1kJa8MiJpDl1sX0sKtF3EFB0ghmf4GKRUUC0XXSWZf7YRTwPmKC8c4Bh6De+vI+20x7lfN+xpEGcMoLN1ccT2zzQOV6s+UAANDQLRQ0PogN+pSvJdGtFDpeFW62uR7+2bjEsfMuqp8GPPHBD/EtEK5GnPtVGQRgg5wmOuJg7XxO3dlhoiEuno06G/ZqkRT2IOgOFUHywbGi7kmRfKqD75fp0f/7vKj06B1MGu6Dk88U6bwN1MFSjZi+khFnCQ7OzRVTPsPqbFIW9fmO4hmSYBO8UV71tAny0KuFnoY84= X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0752; 2:MD6GbiwBpGGLhf81/1dfkyARAlv0FoPIaniAuBvzxYm7mmUmD+3d3Hzv85P0tPR2nkNzUdW14rnUQgIw30gz/cycyEW7XYhH0L2YhkI8sMRAmQNPVhK3YPlwoM6qpNNsXqFwTxuo2cjrzl235JQV28Ya2a/rjO8a6I6KtImqMw4=; 3:9uU+OovCmlx+5iBnF1c8eY/YQdY35+ksahMOghmf22tDV1VKkTpdrqj2eGv7xLP+ffB7LtkB0MGHI+A+gCuczSMdGuTQfuvB8DI4jC35tDYWPwFD8LYDLxyJxEOtmUaWN+XVGNkqxPhqHdsQ2xFKJfVsOWPnD7P3Cujp+LYP4l1DeOVvjGUTT9+YJ3tYJiV/V7oXgs6R4IgNN0NaWivvO8HhXKPxuezNzFYvbAXH1chJBqy9F90tP4uZmo+xO7SZvlE5Fk51SUSsXk7gDiECMQ== X-MS-Office365-Filtering-Correlation-Id: c788afbc-957b-472c-81a9-08d412c973b8 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:DM2PR0301MB0752; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0752; 25:NguuqRSKFfeq++vRU4yRkKC56O9yTfqUHsTAXj9BZXKU/0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MWmCWSGBtJS5fZdZS4dxeh1J4Xu81RSOTumwtqb/zz/8FnVmzdS6U7FD/9MJACFxOZWU1/utgBv/PM3arG1gK4b6iaVFm1LIEpT4RTaOyKcSC9NdUSpu5FkgX+2dADfdoTbZIbP/DcN7v3Vm3zp2DOYRoRwavVOWmff/sHs3tcXHeiY7+6sfGkoeopgcj2AdVD926vFZEA3OUzpbjqIBPJecMPZ53PyTDD1lOwRF0R9pRlFg9UBGNHjN6/1zWbVG01h/VpFDJllAF0bhy8tUENEsh1o6VU6Hccz0KdP/gr85gh1jIDo5UMR/o4qgQ1RaRoXyD0Qvx2y8HeM3mS0XpdJT7JKkqEFBEM0XOawXTSwOJDuUqX+B1sHigsERffvoWzFE+NtwvxvvJttBc7kv2otJowYWpkiAyGJb+tfehqWJfxwq0rVnFAqQyHjrJssJssJeHZGTRitFDkO/C2R+yScQDomhDiF8wuhHpLkAKRTTSsdBH+lo5A60oaR8BAKcdVSRg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095035)(601004)(2401047)(13018025)(13023025)(13024025)(13015025)(13017025)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6096035); SRVR:DM2PR0301MB0752; BCL:0; PCL:0; RULEID:(400006); SRVR:DM2PR0301MB0752; X-Forefront-PRVS: 0134AD334F X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; DM2PR0301MB0752; 23:FJlJRTmS9CWD7CxoaQKcLziKeVif9JDYU8T?= =?Windows-1252?Q?BqNagHJlr8/WvL6pPzfvFdwqaicUqqrMh4ei3QZXzctqffauvnwsgw0i?= =?Windows-1252?Q?NHSNtcVXpf2llvF6gYEyjARdnSRn2/qeaaSHMCbLtIMNEkUyi1GGyV77?= =?Windows-1252?Q?bdHXTapqdrqTqAxcR7HQBn8YZTZ6ZoXnY5SqIijjFZrmWM05gnTfqsvq?= =?Windows-1252?Q?rPnCv1ROGKXXnXQ1oGFg+ERALcy/hYF2XGJhzGKmt0l+QUcwjQ+0u3vT?= =?Windows-1252?Q?XGFrR1yxX7ret8eB1guJufVaWhENhZcjYJx8QWq+74U7ihj6NitD23Jr?= =?Windows-1252?Q?+O48sZ32O3vfHQ6pJYfNK9IWpmu0G8fXyQrZ9Xl9VXLsjNV8EHQyon0S?= =?Windows-1252?Q?3QbjA3O1RDiPsiFOX4n9j7uChtRDON/jf6ABBK0OXIbxhJ9tTz2S66b+?= =?Windows-1252?Q?6Otb0RcRD21rad2Ey9szE774BD88FvAbvkKuBOqW9n1b+b71Eh/5cjY4?= =?Windows-1252?Q?oKV7CEPyWcXdsH3BWe5HUVlhmd9XOgWMyQMZeW735EgIiZ+s1NdmZqBi?= =?Windows-1252?Q?cQOU0pwabnJp4XTISHWiBEgAlAVA2zHpNAcJBmmaTz6HZNbqxtXP+yxL?= =?Windows-1252?Q?3ZMWNaFhfPwXKlQEqXqRzgDQqLaL+9ykQ0d4hb0pK4HiCYBsPcnL35AJ?= =?Windows-1252?Q?7j+Rz1n9+x6FSCsIIeZ4i19nCQmrVz43lqrMbL8+/HXbwqC3on2UiAry?= =?Windows-1252?Q?nBvM4UQQBM9xV9VkY+Cb1LDiqAy4SxUA6P5GtAMCylCH6NEO77lc3uIn?= =?Windows-1252?Q?LHEdSDg0pXF3s3jOkaoU8ntC6JNenoc/CJKSsKH9K5YeVecpKon7QgQU?= =?Windows-1252?Q?zEL/+wwyyGcAsAxY6TlRe4/SlHCL6E8UWKbUZYFbkyxfhDyfNPwzg8tA?= =?Windows-1252?Q?D9xZzJNIldsfFGTVKwwfJjv6xrHO3hb1BB1+UTJ/n/PQB1celjElhqls?= =?Windows-1252?Q?mmfJj4iPaIq/2wdLKUxkuXdiiI/K1mm6PxZBmROkjbj+F20kcm/HUwRm?= =?Windows-1252?Q?x6+JZbhstxr24aK2jt1DAIt4kEGeVl81f0zfshdyaLQUyCb93fJl6yJh?= =?Windows-1252?Q?lNVKx2QY9WuobXq2Q8tn7iOYICgrVT/GK0E3It20BKIlhZZgvPK2YKE2?= =?Windows-1252?Q?+Kq3g5Kjh2teLwHwjoIJopxJzT4YS514WWkktEVXThBTa6LVtkC/2Gjk?= =?Windows-1252?Q?DKp77Eh08cyYAtzOKRxyJdBdxRUOp9Lonqk90oQTl5VFYaesPVIytFHj?= =?Windows-1252?Q?QeD18d0ETLuBn62Z79vSYLYFnkcp8ZG7PRJBsRpH8wleEstdc4pcwu2p?= =?Windows-1252?Q?HbWn0tl017082zT3R6KS6IoyPiD24N2RJMwvpHk1gx+KjQ8gAjqx4nK8?= =?Windows-1252?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0752; 6:wWo81sq/awbeTBjtpMkF/uDmnld5nvBCjI1UuMFHHJdS2ygF5XnNfMaV6PnFck2hL0CTXhUl0ONBtqFDhZeNocf4UfOj+RnEsAAugoRc37YtBigKv1gJmqPoEy2nZT0sB2zdQvGQfQ1wyXPhTafQJks64YuhcFAD+PZiS9syV2sWlwM1zwBkkE4V0c7T46T/msLciYpz5r6LogZsqRt4OXc4yvwGldOxxVrKwQ0F/vJhV0Co+x/Q80lRm7mkuk70ly6dIMqkz+U6c7MxKEwi4EsF+G/gpj4GCOS6Ebjn2Ox3eC+Z5YCe5yzZwYny8DIPkXN1w+4UnW0in8xgO5j25w==; 5:2t7wWJzVuHDz2NzD8qh59CJEgIusdZcgL3lx+S+FpYQ2GQvf48X4dUx974E73vqnqr/lqTfgepasEngbbFYkabaysSmE/pZmuJFyaTphAw/VF2t9L1jU7rsZXk0Q4ZjeXNg8Ar/vAuHmCr6/k9FXq2CsC26JLsPRKeSY89edkzu4EB3nYjgHTMjx4akR4geB; 24:oNG4bJV3cHctZ54hrmDN1VCh16bAQ6213f4RB2ZroZhtBUpYNCjAzySPJdznA6W0JusrAbFyJRNDHiw9KkJNbpQsvxiByu5/Co5G1Sh1CKE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0752; 7:JteO1Gn6sqcAZXsrMC6hwpQf65++5Dl25XCGmHlS/A4zETMMisyO97W8uCHbbzni26hGRfIrXcSSXHjqj9BC7zSf3r4qljZHIh/Zk9Wp8zZqaXkGUqZ3aL+tJdQxKjCy4T3RP7+YwTFtSl9632qh9uqBzXTOOlmA0HDSPMBf7ApjDdPlq+q8nORNwOGyhNmSLFhyplQHks+wdoR81EfX8epTFxmpCQD6+/MIB7DPj9e/V5XFxCczLbPm+lXxX64e7MoYvCOVeLey2V7TWjuO6u+9ELab0/6L/0uEtsOcE3uQHuTeMR3B2iLF3cvEw5M8kYcQ5kO1mWJJCy1fTXhjlSsWUtZRT+HVxxwokApvAg4= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Nov 2016 11:19:40.3408 (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: DM2PR0301MB0752 Subject: Re: [dpdk-dev] [PATCH v2 3/8] drivers: Use ETH_DEV_PCI_DEV() helper 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: Tue, 22 Nov 2016 11:19:45 -0000 On Monday 21 November 2016 10:25 PM, Jan Blunck wrote: > The drivers should not directly access the rte_eth_dev->pci_dev but use > a macro instead. This is a preparation for replacing the pci_dev with > a struct rte_device member in the future. > > Signed-off-by: Jan Blunck > --- > drivers/net/bnxt/bnxt_ethdev.c | 19 ++++++----- > drivers/net/bnxt/bnxt_ring.c | 11 +++--- > drivers/net/cxgbe/cxgbe_ethdev.c | 2 +- > drivers/net/e1000/em_ethdev.c | 20 ++++++----- > drivers/net/e1000/igb_ethdev.c | 50 +++++++++++++++------------ > drivers/net/e1000/igb_pf.c | 3 +- > drivers/net/ena/ena_ethdev.c | 2 +- > drivers/net/enic/enic_ethdev.c | 2 +- > drivers/net/fm10k/fm10k_ethdev.c | 49 ++++++++++++++------------- I found a couple of placed in the fm10k_ethdev file where pci_dev usage can be replaced with ETH_DEV_PCI_DEV() macro. For example, - fm10k_dev_tx_init() +681, - fm10k_set_tx_function +2774 Can you please check once again? > drivers/net/i40e/i40e_ethdev.c | 44 ++++++++++++------------ > drivers/net/i40e/i40e_ethdev.h | 4 +++ > drivers/net/i40e/i40e_ethdev_vf.c | 38 ++++++++++----------- > drivers/net/ixgbe/ixgbe_ethdev.c | 65 +++++++++++++++++++++--------------- > drivers/net/ixgbe/ixgbe_pf.c | 2 +- > drivers/net/qede/qede_ethdev.c | 17 +++++----- > drivers/net/vmxnet3/vmxnet3_ethdev.c | 4 +-- > 16 files changed, 185 insertions(+), 147 deletions(-) Some changes in szedata2 are also on similar lines: - rte_szedata2_eth_dev_init +1419, +1420, ... - rte_szedata2_eth_dev_uninit Some changes in nicvf_ethdev.c also are missing, I think: - nicvf_eth_dev_init +1980 - nicvf_dev_info_get +1350 and nfp/nfp_net.c - nfp_net_init(), +2333, +2403 - nfp_net_close, +718, +737 - nfp_net_dev_link_status_print - nfp_net_irq_unmask, +1161 and bnx2x_ethdev.c - bnx2x_common_dev_init - and access to intr_handle which can replaced with ETH_DEV_TO_INTR_HANDLE Is there any specific reason these changes are not part of your patch? [...] > diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h > index 298cef4..9d4bea7 100644 > --- a/drivers/net/i40e/i40e_ethdev.h > +++ b/drivers/net/i40e/i40e_ethdev.h > @@ -671,6 +671,10 @@ i40e_get_vsi_from_adapter(struct i40e_adapter *adapter) > #define I40E_VF_TO_HW(vf) \ > (&(((struct i40e_vf *)vf)->adapter->hw)) > > +/* ETH_DEV_TO_INTR_HANDLE */ > +#define ETH_DEV_TO_INTR_HANDLE(ptr) \ > + (&(ETH_DEV_PCI_DEV(ptr)->intr_handle)) > + Can this be in rte_ethdev.h just like ETH_DEV_PCI_DEV? Or, as this is specific to rte_pci_device, probably in rte_pci.h? Many drivers can be replaced this for accessing intr_handle. - Shreyansh