From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0073.outbound.protection.outlook.com [104.47.42.73]) by dpdk.org (Postfix) with ESMTP id 86B7810BB0 for ; Wed, 21 Dec 2016 10:53:30 +0100 (CET) Received: from BN6PR03CA0065.namprd03.prod.outlook.com (10.173.137.27) by BN1PR0301MB0739.namprd03.prod.outlook.com (10.160.78.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.789.14; Wed, 21 Dec 2016 09:53:28 +0000 Received: from BL2FFO11FD006.protection.gbl (2a01:111:f400:7c09::110) by BN6PR03CA0065.outlook.office365.com (2603:10b6:404:4c::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.789.14 via Frontend Transport; Wed, 21 Dec 2016 09:53:28 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) 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.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 BL2FFO11FD006.mail.protection.outlook.com (10.173.161.2) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.789.10 via Frontend Transport; Wed, 21 Dec 2016 09:53:28 +0000 Received: from [10.232.14.87] ([10.232.14.87]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id uBL9rNOS030194; Wed, 21 Dec 2016 02:53:24 -0700 To: Jan Blunck References: <1482232315-21626-1-git-send-email-jblunck@infradead.org> <1482232315-21626-4-git-send-email-jblunck@infradead.org> <463bac9d-4319-c707-6678-bb06281376df@nxp.com> CC: , , From: Shreyansh Jain Message-ID: <32768ebc-e009-32fa-1c47-e7f801f05303@nxp.com> Date: Wed, 21 Dec 2016 15:27:02 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <463bac9d-4319-c707-6678-bb06281376df@nxp.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131267876085724944; (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)(336005)(39410400002)(39850400002)(39380400002)(39860400002)(39840400002)(39450400003)(39400400002)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(24454002)(377454003)(77096006)(626004)(104016004)(38730400001)(92566002)(85426001)(356003)(305945005)(2870700001)(69596002)(83506001)(110136003)(86362001)(229853002)(33646002)(65826007)(5660300001)(6916009)(6666003)(2950100002)(64126003)(65956001)(65806001)(47776003)(81156014)(81166006)(36756003)(8676002)(189998001)(4001350100001)(31686004)(68736007)(105606002)(97736004)(50466002)(4326007)(2906002)(54356999)(50986999)(76176999)(106466001)(23746002)(8936002)(31696002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN1PR0301MB0739; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD006; 1:d8sN9AoH+RYb4hlWgTNZqbr+iXoX6Q8S3JKeaYC2o1FPKygL6tzbdI9XmHLmLJ6b0bRNaZ/iQ64Kv/tpy8kil3AjXZ8A+56rGosS0Co0FCvSDPlY5EU2Rb/1oD4mQ0IzOmS4MWVPTKQVBWwbn7F7wl5ROMrDLm254hGJBGc2yRrG5AU92EiszhzCH8miX0ha1Jj93KAiAtZ9VyShL+8CPJqhVcq1jIp2cQ2fckCXcJ9apdqdGGExDnl/CepFqc3kBfWXaGg4S20KalO1WizCnXPwRohMSbpQdHZ8zXeVSKSwB0zibO1s4bD161pJo38GlWq7jgl3qJA5bfjIvzQenZFJohlOyb/2xrXJfPvEtfWWdPXxk8OVagJLUD0vJ059Vg3RFtpEU01n8nW7A4++nBhLLIEZoQJrL/P80XfnE8G+WoTrtLEDPA1SL6br1w/DtXmPJrT3PziX5rZFc3FcudSv5XCmPx5rbF7tCDHu3GqpfpsDiPvt8rXYSV+2Lekt1VqEU+g6Vxoai+/pET40uFwzINsQMGJ0/rW9TMeiCzJDx1QwXLIgtOM6LvGQ/OXjQO1CTBRto77InEx6JfhAIxIjoVKh1guiFwvsqm3fYSA= X-MS-Office365-Filtering-Correlation-Id: 9970223d-b46d-44ff-15b0-08d4298736f7 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BN1PR0301MB0739; X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0739; 3:yxjeXz3Gs8iDZR5Zt+a3IkMRTzCjv9gVSSJWYbvF1CU/1ZnFnmOJ3dyNxXzhVBb0ktG0w+rPUFxsL1LeCo3buEroPiBdb3VTvHRlOc2ZiQbkwA/I82w46oUYKn+x763l+0omaZVs/GJOARU7oBEN/eZbcPROpHdmYWTUQ/GW+KzYnb6sS4In/+XGfTa+bPQrbB8L6fQaLjLFQmYmk82TwqrkGbJvuZQgBd44OCew58thnoT0NcPPEP4wLW5C7NpgqIXWBiQtrQ6tfBR030WCWuPz0YnQVOEe+PYRpib5LOLCfkQIj2nlW8HRP6H0IgFeNyuVWHX86+E5XjcT5ro70AQ0b3xILm3XqX/xt5QszRn+TzAmgKIib/sCi2WFk3Su; 25:MaX/fEgX4kv5SA1GI6WKjMO88VTcO+CFmdEmEH3h3W7WYZETDYrrEgWhFQvzxvRZNrGTBkfxD3m4yJGE1EoMmBx1MwNQSu4uI8+/q76deFKHG6PVfUr30bYpdyCrXfb/BxbjbOsbzfuIg2n/TTZ1uPhJbthDjmzrATnd7VLRRQFHW5yM/ivtvQVMAHQq5KAD5pzoypkvvvrnuH/hQy+KMeST8gEFzF8mR+7h5r7HY5PM/gSqzO9wYaJKW3vqKL8dmjmollKCYHAd3fN8Aake1GPh8vIc1Hhnb7ltMoZsAmnm9zt7++BcuXg3CSra5lqhZns2vCCIhkuRinoj+18UbutC5YJm4KvuS1JI0+qjLI418YmehTjhRfLz6jzl4j+s8pk56fQ8B60I650JRFqWtZGDhkKdylo+Aw5T9Xk1LGHprnfaKq+e9rWTwFZknZgDHifOV8AhfOLWTOc/AwX/Fg== X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0739; 31:Riz6l2Bry1DZgTy9TqwhhYGih6ZU6tjULCDpQuL1oeBjOLjh4VlQVnnQVDbtu9qNMBTGj1O3rmMwj4xfck5tTG2WCnkhG2aKgSN/1AzjSAfXqIvTt5kEHGH0/6MO7fLOkP5IpomLvmKAx4p4lTQjmQUo9i5dsAXTu5oyCGxyQ3O8qxpH4riGa2OJkx4Iakb6IWr4DKDz6oPiFlV7K1qO8DKGV547F5VrU+eiDTbU/DO7VQnuSqgO3j94dB9fKTcCy3Bga+lflRX0aMOxfQQmqkRL64NNbgNm88gIDOre7n8= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095060)(601004)(2401047)(8121501046)(13018025)(13015025)(13024025)(5005006)(13023025)(13017025)(3002001)(10201501046)(6055026)(6096035)(20161123561025)(20161123559025)(20161123565025)(20161123556025)(20161123563025); SRVR:BN1PR0301MB0739; BCL:0; PCL:0; RULEID:(400006); SRVR:BN1PR0301MB0739; X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0739; 4:F1/inV9X56txjjd/904psM6JIbhrhxvNv7yhpZU5PDVCf4Id2K+6gYN+Bm18rvEGn5mGULe/40bZ0rPQkl9TSW7oU6T/XXSj7zEyyLZ2bmYLK6Qwyie6u6keKdLDi2KSBdFVxCqoXswEOc3U53pfFRId/ugAKDJZFSjiFERZ30iJlx9zmvvH8bPdQfv7JwQ7Xj7fI28ASuuyUXr5CmP+tt9VQcROkVC3s9sblE4lDL7Me4IFNXgQldhck0Kr92JyWdXL3Vn5M4niHKdHDWpxVNokCD+luGCN5l4uOE3lMXWyqGvcRjmxByG/WNXEn6RhIAt+rZ5A4fELd/VpNXrNFGS3BX02vXZAli4AiFZH1RWCXll9ibj3ZXWVwx0DSrrpnrJzb33IrznwPCV31FA0F9IWySCKxrp9+H4Zh5nNJ63H3+nai8LfBIXhOA10CiL0kNrip8bs+WEqMiskaU6fwasTVqKXUHYt25Ig8f7l0T2MdhFRGppDtva+l10NTU0kToyNTtJkLNbFik0ajISII1MgwyIOAFpKp2tNqVubYTzinU6CY8FBtM4wI92QqPbYR9YI+9K1lKQhycTQ3A10SpqA+DL3U7A9tzSDRYD75EMEC+7eLrBmh6VXQ8qH8ln9YD2UnPVr2NDm9tByN559xzaRuE7k4fCz0pENA1Z18OnuWciOqkN6lMrwt4L98tgMscN+/mi+C+Zap7DmrteNVA== X-Forefront-PRVS: 01630974C0 X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; BN1PR0301MB0739; 23:16NMkwAGo07COaOs82fcEcPQYOG2VdOO18t?= =?Windows-1252?Q?AsfUtxmsHCgu/wl64GHUie+R8HFFnMr0qbuasNFWHLM1m6uEGkRKZlJt?= =?Windows-1252?Q?heqFTj3VLvfV77pYnbXzMSIXCAQWfCQQYFJtp/DZ5ibhSkJnN2593C1Q?= =?Windows-1252?Q?+xB3TjbQ5zEwB3KskcUd8/QP3zTV2CQory7W3BMOykoIPrPJy2QDcAve?= =?Windows-1252?Q?+iJdwOW/wv5tQiOyKxwl5OygocnzTnquKKgW03KKEBwUwclcDDK9sBaC?= =?Windows-1252?Q?3ooT1YwDaR216L6XDG4HnZvzJ7U1D701SqvAR6bYd6D4YoDUonko/iap?= =?Windows-1252?Q?gjBLDAJP9zH7kjNcIwhGEW3v5lQ0I1f2EXsQjBgTA2S2s+MPicrxh7UD?= =?Windows-1252?Q?giPr+2G53A9U0vLqpIfbzdJijWvYFk+rR+Y0yymNeHKudqfElvSZalvT?= =?Windows-1252?Q?sLzaQ7OUOAnP3+r/i2qpabynw3DZ8bobW89MUsZbtzeI6Zc9BBLJR60K?= =?Windows-1252?Q?cg9eRrbmG9beS+PUKUBilH/D+lmaX28D2Qc/2B54AlYWbGNT+BA6mMma?= =?Windows-1252?Q?C5OOHrlRTdxNVhQts1UL3FnVGMOJVTyoaKB6K3v/OtWMmH7TcYFr0f3G?= =?Windows-1252?Q?4szTNedytcxFLG/vlYYIM+/VinBTT+nE3YO1YI+fm0gcEd6qbklVTW9w?= =?Windows-1252?Q?Y8D/5PJXcJdcXsaXaMVBzoMxBBV62S7wW1t2IvZbMvaUKnhUOTFEqoz3?= =?Windows-1252?Q?9/nQS2dgwJg2J4QWX39C+xT96GkqR6fT9FDDWkeiyd4B/HAE3otT5iIt?= =?Windows-1252?Q?Utwsb1wELoj1XF9RB+jb3Zt0HkaCxOukvSnqM4oG/l9kLCCXhoW/Kyp+?= =?Windows-1252?Q?P+bFfNd5wGXmu5n2eHwNwPVe+2oEz0TsW05YOlZzc373tP3H+Uml/NK0?= =?Windows-1252?Q?GO9tcUZ9pmUHBtgMySd8Jj/tnauGXggf627b2rJEB5Cfv6jSQ2fn8O+Y?= =?Windows-1252?Q?PdWO1TmI0vSkSOvnD7XOelhywXkH4vfmb4y+mCBMlHd1SLQP3lgMKSKi?= =?Windows-1252?Q?he+mjFD9MoasRSQWjy6gQ2NuRAf/lbENDtR7/PCqO+TpvX68OsCcdVqY?= =?Windows-1252?Q?3TLZzEuV0fYlpzQeT+yDBTeR/BsJ5rWXaMniVjYhHs30O+ovG6CpjEHC?= =?Windows-1252?Q?CNmMMjnvyHfgViyAZ1+uQVQje7oikJMTprx48r19zz5b0dZTpMipCT3n?= =?Windows-1252?Q?4Pdm2EfSJCRTQ1S22rFnOu51CA7p8nZYdz+oBJHMcujfVI1P+bRNlEjl?= =?Windows-1252?Q?brrCnvLFIbp4276Y47XQlY53QcMemMuQZqx5hMx3HU61WLuFVpMmNgqw?= =?Windows-1252?Q?ek5fgFa/E8IpI1keYksBP0slrbKxuMuOcR86qQ5NTCGidwrAfPXfwD0t?= =?Windows-1252?Q?OroMgoJzXisZkxrX+Q643wqDGXcGFPIpNG7cX5l28Fxxr+Aw5gXxTXJd?= =?Windows-1252?Q?gGcnvewyPAaraffPXJmjDBQBQhV+IyICq/D+/We3jL08vs7YgJitl7EM?= =?Windows-1252?Q?iXmrsiddjqiJvARTgmqFTOv+A/otMb5rC14A+ub6fZHI7hKvggHW9TBF?= =?Windows-1252?Q?WkQ=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0739; 6:kKCQVfyqnyA6TyuRnEPcWZzyCYwlBxAPoSnfF9fEVnoi8lOQoRB6XTF/Qm4ZUsmUovd3MBHuD1J4o+Hk51fXhhGPqgygeQMNiUOcvGXiVEZ475qjzLZRLh+1LYqdyDRhYOmMTRkBYLftrM8Bxd3wObKLSKrvbzjVHuy1bEv8FeBekWjtTpEjSIsMX9Y9cilRI8muxaMkHXWDfDTsz5+48fTatPquaDEeuop3IS5OWlHyrSCvyvtX2hrs9HDSl4LgxBXJZw8aAMZcBy207kUVV0varACIzNepi+Yr6r25nwsqmJLU+Pt/rxs2C+6d7JxibHUwfIYNAhO9q1XhAaQavYncBrg6SMXhVCgqbSgwBvfpZH06eeZNmEZAHqXGEtBcXdvL1mGHK1Wwo97rAOgSGBncXv0FamBFLp1uG8bS7yHZQJ7iaQyTpj45ufpSdT2q; 5:bu6CyOlE+lX8kr1DhJnFYK40WPoC+lSStR5xwKyMX5glmq8f3RAZvemor4/HrMGNR8KM6ZuW2RTM4a4FuykJc3KW4Ofi8j70PUMftjhisB4ItZUKJuGN+z1ChlRQS+qQOIzoruxjraWllG+gOVT/IARJ+2sUvrul7EOXvXggfZ/STGTSnFn8gexZScR5SpXy; 24:MoLtByXUfEeaK5SH0kancIm0K99cI8dP0rNcyJLd0wOWFYYNhpU8g3CQrF4bVOd/Dc0nQwrHL2GIYOAFOiBMZKq/wZpPUctx7IamrmdWhuY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0739; 7:VP34+msh/7B4UUUk9Ja7WhM5iB1+7kBDWfpE6I5j4EjW1m+Apd+8r4gGLH5Mi8uPDl42yop11mgNUcIMkivHqIWaqcBtliw+OoOoAw7D3vWyxBGsKFpG0PwgKQPRXHiNSCTLF6gABTSfvt+/J+K+6efI8TruhBCF2qqu3Yk0qFC/NZs/p4xIxdgLAvexlsmY2elnPJgWaQ/asd3qYLmbyDD/oaWn/KuI2gAJT1XwVuLBNMJySVQM+nQ45vtPR7LDaX6jCjdVgb/F4BJITzJAAwNkDj8u/dMZdMPZ2rryZqEjMr3J6rvuK52rUYu+55xoGIOOYbP+DfXHsHYNS71r33Ll4ot0o0hN6cm6bNOgs1isXLIztulCKqCyCHQq1HTBkja6wuoAhKBJYRG0pwsBKfQ/AfKN0jse4i6wjIYcnECpmKHKL3CQMxeA+/3ixXBVGODBZOvJ/kmo6GRm/ptfgw== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Dec 2016 09:53:28.3384 (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: BN1PR0301MB0739 Subject: Re: [dpdk-dev] [PATCH v3 3/9] drivers: Use ETH_DEV_PCI_DEV() helper X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2016 09:53:31 -0000 On Wednesday 21 December 2016 03:20 PM, Shreyansh Jain wrote: > On Tuesday 20 December 2016 04:41 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/bnx2x/bnx2x_ethdev.c | 12 +++--- >> 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 +++++++++++++------------ >> 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/nfp/nfp_net.c | 16 ++++---- >> drivers/net/qede/qede_ethdev.c | 17 +++++---- >> drivers/net/szedata2/rte_eth_szedata2.c | 27 +++++++------- >> drivers/net/szedata2/rte_eth_szedata2.h | 34 ++++++++--------- >> drivers/net/thunderx/nicvf_ethdev.c | 5 ++- >> drivers/net/vmxnet3/vmxnet3_ethdev.c | 4 +- >> 21 files changed, 234 insertions(+), 192 deletions(-) >> >> diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c >> b/drivers/net/bnx2x/bnx2x_ethdev.c >> index 0eae433..c331ccd 100644 >> --- a/drivers/net/bnx2x/bnx2x_ethdev.c >> +++ b/drivers/net/bnx2x/bnx2x_ethdev.c >> @@ -124,7 +124,7 @@ bnx2x_interrupt_handler(__rte_unused struct >> rte_intr_handle *handle, void *param >> struct rte_eth_dev *dev = (struct rte_eth_dev *)param; >> >> bnx2x_interrupt_action(dev); >> - rte_intr_enable(&(dev->pci_dev->intr_handle)); >> + rte_intr_enable(&(ETH_DEV_PCI_DEV(dev)->intr_handle)); >> } >> >> /* >> @@ -187,10 +187,10 @@ bnx2x_dev_start(struct rte_eth_dev *dev) >> } >> >> if (IS_PF(sc)) { >> - rte_intr_callback_register(&(dev->pci_dev->intr_handle), >> + rte_intr_callback_register(&sc->pci_dev->intr_handle, >> bnx2x_interrupt_handler, (void *)dev); >> >> - if(rte_intr_enable(&(dev->pci_dev->intr_handle))) >> + if (rte_intr_enable(&sc->pci_dev->intr_handle)) > > > This changeset generates following error in my environment: > > --->8--- > /home/shreyansh/build/DPDK/01_dpdk/drivers/net/bnx2x/bnx2x_ethdev.c: In > function ‘bnx2x_dev_start’: > /home/shreyansh/build/DPDK/01_dpdk/drivers/net/bnx2x/bnx2x_ethdev.c:190:30: > error: passing argument 1 of ‘rte_intr_callback_register’ discards > ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] > rte_intr_callback_register(&sc->pci_dev->intr_handle, > ^ > In file included from > /home/shreyansh/build/DPDK/01_dpdk/x86_64-native-linuxapp-gcc/include/rte_pci.h:86:0, > > from > /home/shreyansh/build/DPDK/01_dpdk/drivers/net/bnx2x/bnx2x_ethdev.h:34, > from > /home/shreyansh/build/DPDK/01_dpdk/drivers/net/bnx2x/bnx2x.h:34, > from > /home/shreyansh/build/DPDK/01_dpdk/drivers/net/bnx2x/bnx2x_ethdev.c:11: > /home/shreyansh/build/DPDK/01_dpdk/x86_64-native-linuxapp-gcc/include/rte_interrupts.h:73:5: > note: expected ‘struct rte_intr_handle *’ but argument is of type ‘const > struct rte_intr_handle *’ > int rte_intr_callback_register(struct rte_intr_handle *intr_handle, > > --->8--- > > Problem is that earlier 'eth_dev->pci_dev->intr_handle' was being passed > which was not a 'const'. But, the BNX2 local structure 'bnx2x_softc' has > a 'const struct rte_pci_device *' as member. > > Maybe, following can help: > > rte_intr_callback_register(Ð_DEV_PCI_DEV(dev),...); Forgot to add to above as a side note: In case you are trying to extract info from private info of bnx2x, my suggestion above is wrong (though, the compilation error still exists). > > >> PMD_DRV_LOG(ERR, "rte_intr_enable failed"); >> } >> >> @@ -215,8 +215,8 @@ bnx2x_dev_stop(struct rte_eth_dev *dev) >> PMD_INIT_FUNC_TRACE(); >> >> if (IS_PF(sc)) { >> - rte_intr_disable(&(dev->pci_dev->intr_handle)); >> - rte_intr_callback_unregister(&(dev->pci_dev->intr_handle), >> + rte_intr_disable(&sc->pci_dev->intr_handle); >> + rte_intr_callback_unregister(&sc->pci_dev->intr_handle, > > Similar error here. > rte_intr_callback_unregister(&(ETH_DEV_PCI_DEV(dev)->intr_handle), ...) > solves it for me. > >> bnx2x_interrupt_handler, (void *)dev); >> } >> >> @@ -516,7 +516,7 @@ bnx2x_common_dev_init(struct rte_eth_dev *eth_dev, >> int is_vf) >> PMD_INIT_FUNC_TRACE(); >> >> eth_dev->dev_ops = is_vf ? &bnx2xvf_eth_dev_ops : >> &bnx2x_eth_dev_ops; >> - pci_dev = eth_dev->pci_dev; >> + pci_dev = ETH_DEV_PCI_DEV(eth_dev); >> >> rte_eth_copy_pci_info(eth_dev, pci_dev); >> > > > - > Shreyansh > >