Message ID | 1509617335-6354-1-git-send-email-hemant.agrawal@nxp.com (mailing list archive) |
---|---|
State | Superseded, archived |
Delegated to: | Thomas Monjalon |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 460401B3C9; Thu, 2 Nov 2017 11:09:50 +0100 (CET) Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0059.outbound.protection.outlook.com [104.47.37.59]) by dpdk.org (Postfix) with ESMTP id 743621B3B3; Thu, 2 Nov 2017 11:09:47 +0100 (CET) Received: from MWHPR03CA0050.namprd03.prod.outlook.com (10.174.173.167) by CY4PR03MB2696.namprd03.prod.outlook.com (10.173.43.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.197.13; Thu, 2 Nov 2017 10:09:43 +0000 Received: from BL2FFO11FD028.protection.gbl (2a01:111:f400:7c09::118) by MWHPR03CA0050.outlook.office365.com (2603:10b6:301:3b::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.178.6 via Frontend Transport; Thu, 2 Nov 2017 10:09:42 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.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 BL2FFO11FD028.mail.protection.outlook.com (10.173.161.107) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.178.5 via Frontend Transport; Thu, 2 Nov 2017 10:09:42 +0000 Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id vA2A9bnQ031572; Thu, 2 Nov 2017 03:09:38 -0700 From: Hemant Agrawal <hemant.agrawal@nxp.com> To: <dev@dpdk.org> CC: <ferruh.yigit@intel.com>, Neil Horman <nhorman@tuxdriver.com>, <stable@dpdk.org>, Jun Yang <jun.yang@nxp.com> Date: Thu, 2 Nov 2017 15:38:51 +0530 Message-ID: <1509617335-6354-1-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131540909827216392; (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)(336005)(7966004)(346002)(39380400002)(376002)(39860400002)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(106466001)(305945005)(81166006)(8676002)(81156014)(356003)(8936002)(2351001)(4326008)(97736004)(189998001)(36756003)(85426001)(33646002)(68736007)(105606002)(77096006)(50466002)(53936002)(50986999)(50226002)(54906003)(5660300001)(48376002)(104016004)(316002)(498600001)(8656006)(2906002)(16586007)(575784001)(6916009)(5003940100001)(6666003)(86362001)(47776003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR03MB2696; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD028; 1:YqdIL06ITBy0BP9ZetCXKAsDeTMzroY+jL+yPbCR+0fL85AKAJf984w/R6saYftf0E3ztTycs4OnYTTRz5BbF2YLN0JNwnBhFdeQWZL2Jvr+4+0zQZqBoDa4QW9cy716 MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3c6a4228-589c-4328-d408-08d521d9d625 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4628075)(201703131517081)(2017052603199); SRVR:CY4PR03MB2696; X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2696; 3:16Mi1jy59GUqhM8esYfoS6NyrN7/iHqZdqtuNKg5Qv8m0Mo4Vwl5DtOnndKKTNgR0sWOdb9gA8BkXltyxSMaNW4cf7c4+vL0AXyDCSlrRaSJi3W8f/vSazu5ZKfoyQ62UmrMzpGHBC4rzARgbbeY2vPc+Ty/bIiBLx2znnx2+crkYKOwKkgd8a5CJ03kgHT/Ryl/NSILruZVIt0mYtx67gXGXPm7LxqN+Ip4rwyQ0VLSi0yNigoip2LwFaIrC0HimK8DzrBj+dHnEPVNqi7JbwoJsnXVY05qqEul0aMKzHUmWEtiAhcZ0+C7ok8bjdizFXf24DZ4nzHYszzXN+VMha4OtumwTyK51N6s9qT3+pY=; 25:oGYFOal+wlqvnml69PeFyAXd0ONaDsiVXdmw1KiRHDonbgSe13cQCIuZASZYZMBZcJEIIXYGFEZYEYgzHkxlwxr4n9ayhuXRUkASuXkXaDG+Z5nIAjCEOyXHDGpFYDJnNffRsjDO2JXCF6baYM+KToU9jX0+fMb60dOh8JmRhHZxB/zIYpO87EUwngYYZlqWnj56C+LvVepBvmGDn6eiyXOCMhGw3xhQVgSerspLmNU5VTZvoulRc/XnGmZuZvFXpfUH4LuDYdtmbjmBjef+B6qYgXHybApYKt7QEcugQUH4BEFA1GTy+yjhjtabyNBKgvYpEzQnHXVTbDyCaETv3Q== X-MS-TrafficTypeDiagnostic: CY4PR03MB2696: X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2696; 31:phiAIKcsC2X5m/4LnUBW/1rhjIq3m6mcJ4I0bkv2u9hxe/dJObB4s50hRhB+WnwVonlZRpz4obxSeta/Od0NJiAnGGciCIe3TSoDXfL5yvfD8rn+trgBDvN9lM2/axUK+y87NfgMWVEfkesHLM72sq/CUhgZjhUg6rQlj3R8g/vLG6iNWERJP6UUIlD5ckgJebBoXj4L0oCGxTWyYed5XwyjPcJl2IadWqltLDntRog=; 4:N+iO4R64egQXLSqVIaoQeuTKmv4vHm9TjRiHEctgSxaM9eb4o08b0wk31apbVTOyQPX9/rIUEn/XR2PsuNBikya1OkPAcs7WhDsZbNqbFXHPb8kurYu352HwalR4WglKdBYtMthyp8RzPMLvmYVN85fIVWP1Z+68SffnR79YyIGYOf3isD1UC48vfZtseS7XoN52fWQU912IJCYTJx6Y4Eq7CEAcMzo7U8x630nzIqek9vcIPMzmTf6cTqsnqV87W/wDfsxNep1JxwIbcuvRfo2tJyujLoSKQj3j0ghjo/ZkRcvkkXrpQ+gV4DiZjjzpC38hVC+rfgdDIO4dZ1+Mioq2QxnCkx2tPe3kghy4u0A= X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Microsoft-Antispam-PRVS: <CY4PR03MB2696E8F6058E7330567FB6FE895C0@CY4PR03MB2696.namprd03.prod.outlook.com> X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(100000703101)(100105400095)(3231020)(3002001)(6055026)(6096035)(20161123559100)(20161123561025)(20161123556025)(201703131430075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(20161123563025)(20161123565025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR03MB2696; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR03MB2696; X-Forefront-PRVS: 047999FF16 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR03MB2696; 23:AC+B3BzjgXYsuwVLpga5hvYV9CEtJbGBQkp4ugYRM?= v7BUdEVO7u93Ri7Mhgo0Uv9taHRJjvoM2M6dAzsr3uKfPi66qVv2asV8xz4U5/ujeg1x8nMTKyaYdXGCNEWF41xtYYkeV/Ga6lOhCdYve/0uBxRW9Bk2EV3FfpQNr+TWVTR+cczED+ZBVMC+fUAHI3SXsWuekvFFqPdVPpQeznVMpAIgbWHR0hHja0D4Hjdzy97XmnpgFQeCUFbiDhUoXitnxLW1Q3izYmGcdfzXeitoo7CG7LaczJXMKr+f5W+Cwy6OwQXVwlK//PuCs3pbRBRxtzTmiLZZRYstmarwN8kcc8x+DgokZ9JJ7wTuxbcWdTmjRkxs/8LZXHEvDjPViU2P8QrCTuLH9vnt8LrjCN91OQ5EOhvHuzqC+Js2boK3S5T/tz9FDBWAHdPkcp7fA6A+4mu6QM4ebxcESBobubqQoaQcaHrcaT0kdjE7uAkPYitezLioSO6GcNM4OWLiRp88KzHDPUtX0f6p2zLdjWox/FBt5WsnkWsGzQs1LKHiIuxI/wQ9ohsHyJzPtFWo2HsPz5VxcmIbHFLouZzL0Bg2I3Q8ALFdRfB6b3F8ATVbVOsMwY1jSu9ZdnS1v2Zi85J+0SiNkEtiRBZozoRvYbGWcKek7GSKInvrDw/snNi6qwicZZYQgAYtEvujnKjtrQYFmQepAQknF9k1PZWg1CcOtJ4R9Dk4G5ZsI3efU/uafd5Ymbt3jxND5JdrJhnJ+T/qckYhkXAlmqcx09TvXQ9yDxQe6q7du/IxVu3et3nKqu//Ahq1eLqCQHMIKzLSUe5GWPcjlAySqw/OCvi/br3HlnQkINl/GJsCOwXOh8EBt329jALgpoazouqCYMlBclWnvq9RhbxWvilTyJx+wBd0jJQJAfPU/aAZkN0a0VncZawfWEl4NN2iRhgD6HhZkUnL59le4cQULWjjpRianqJjI9wvU1tT0s5yFAopZZKAHQWeCuJnYQgg/fjqdkVy5GV0gBPASuu4awZef9ftJ67zQeugfu4pLPbmSF3Pxc4W4ZMRUOTWRkC8CcYU1E8r2SfFwDygZYahqlmsgFL/adpx+WhEUkqmbIHKuG0QK9pB7lw9wJNyT7gbOvOXAUEgnvyssom/wTeo43PMvNl0qFWHg== X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2696; 6:TfjAvdgP5Foa3QELnCYqVaRSRdoEaYYaCEVj9OZvOsqY/vYUyFONUVpk7sITcePrvjslCIXJFKhPJaQprgsZjmDM9CIccm28f0za4vMeWp25+sJ4SbL7c+kiLDqLc08UvHILcs3fDWTv7KazWSm+2DRG5G07uD4DKg9bt3wwsKqR+4ItSjHi50VYWLP+qsS3N1N+KkBMo5fEAUPm9vzYdxO3bpQ+UzE2zbflfll5Q/3mhgeukG1oGYq+eau6Kah4j+OKvsda1ebIeTVgsVhYdc+1E19eB24oMH780wEdwwSCR+IbQDvFrpRiyS35ckqLNSm6LvNVdfNbZcHoNCI2/gQ4pV1nm34RRhQ71rXFHCw=; 5:F9ov1tPuMk+BWHIM4kfY13YFrfBbehg4s/B5vOiv35Llmq6lKM/Oab+efSO643zWjo5mQJF2x0aXRXQNreNV13nAvWz7XCFxNRJCdI68uzjWPa2ZzpY8SDiObEAkLAXLr/sygTD3ZVsxG71gTXHK/99+kAOBN14aRFWzjoZCUSo=; 24:P70Y8c+3Lcwre84+tWleuEmYbrCyoy4w9iVcdZrZGM2sJm/cIyicJ+tzHTmNqYG8eb8YrqG2+itd6+oxwKvUsDcRIoh5KDuZMB2MF0NiF6U=; 7:0j67nxM3EVtVRqOvZzpfoHYRaoFaoWJgqXAUN+t0N7qfXL0WQJoG5JrV3oQVnN/M79Nc3Yrwq3BJGndplvrsYn88YiZkflgqUrILswRilY9hE8fbYMAAWSmdQLEMyOrLLlk8gtdkoolrYq1U0MHbOXYoyRVdDVA1/Yan+1edIgV8G3gE36mtJThdL4i5za5HUHcTSlKP7ho0PEIE8k5+HIBAL8HROvrgbDKK+xnd5lQC+eVMo7JvXMb3wCITBflN SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Nov 2017 10:09:42.5656 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3c6a4228-589c-4328-d408-08d521d9d625 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: CY4PR03MB2696 Subject: [dpdk-dev] [PATCH 1/5] pmdinfogen: fix cross compilation for ARM BE X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <http://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <http://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Checks
Context | Check | Description |
---|---|---|
ci/checkpatch | success | coding style OK |
ci/Intel-compilation | success | Compilation OK |
Commit Message
Hemant Agrawal
Nov. 2, 2017, 10:08 a.m. UTC
cross compiling DPDK for BE mode on ARM results into errors "PMDINFO portal/dpaa2_hw_dpio.o.pmd.c No drivers registered" Fixes: 98b0fdb0ffc6 ("pmdinfogen: add buildtools and pmdinfogen utility") Cc: Neil Horman <nhorman@tuxdriver.com> Cc: stable@dpdk.org Signed-off-by: Jun Yang <jun.yang@nxp.com> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com> --- buildtools/pmdinfogen/pmdinfogen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Thu, Nov 02, 2017 at 03:38:51PM +0530, Hemant Agrawal wrote: > cross compiling DPDK for BE mode on ARM results into errors > > "PMDINFO portal/dpaa2_hw_dpio.o.pmd.c No drivers registered" > > Fixes: 98b0fdb0ffc6 ("pmdinfogen: add buildtools and pmdinfogen utility") > Cc: Neil Horman <nhorman@tuxdriver.com> > Cc: stable@dpdk.org > > Signed-off-by: Jun Yang <jun.yang@nxp.com> > Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com> > --- > buildtools/pmdinfogen/pmdinfogen.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Comment could be a bit more specific about what the problem is and how changing the hard-coded "32" fixes it. Haven't tested the cross compilation part myself, but this causes no errors for 32-bit or 64-bit builds on my system. So, with some more detail on the specifics of the fix in the commit message: Acked-by: Bruce Richardson <bruce.richardson@intel.com> > diff --git a/buildtools/pmdinfogen/pmdinfogen.c b/buildtools/pmdinfogen/pmdinfogen.c > index e73fc76..9119e52 100644 > --- a/buildtools/pmdinfogen/pmdinfogen.c > +++ b/buildtools/pmdinfogen/pmdinfogen.c > @@ -181,7 +181,7 @@ static int parse_elf(struct elf_info *info, const char *filename) > sechdrs[i].sh_offset = > TO_NATIVE(endian, ADDR_SIZE, sechdrs[i].sh_offset); > sechdrs[i].sh_size = > - TO_NATIVE(endian, 32, sechdrs[i].sh_size); > + TO_NATIVE(endian, ADDR_SIZE, sechdrs[i].sh_size); > sechdrs[i].sh_link = > TO_NATIVE(endian, 32, sechdrs[i].sh_link); > sechdrs[i].sh_info = > -- > 2.7.4 >
On Mon, Dec 11, 2017 at 12:40:32PM +0000, Bruce Richardson wrote: > On Thu, Nov 02, 2017 at 03:38:51PM +0530, Hemant Agrawal wrote: > > cross compiling DPDK for BE mode on ARM results into errors > > > > "PMDINFO portal/dpaa2_hw_dpio.o.pmd.c No drivers registered" > > > > Fixes: 98b0fdb0ffc6 ("pmdinfogen: add buildtools and pmdinfogen utility") > > Cc: Neil Horman <nhorman@tuxdriver.com> > > Cc: stable@dpdk.org > > > > Signed-off-by: Jun Yang <jun.yang@nxp.com> > > Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com> > > --- > > buildtools/pmdinfogen/pmdinfogen.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > Comment could be a bit more specific about what the problem is and how > changing the hard-coded "32" fixes it. > > Haven't tested the cross compilation part myself, but this causes no > errors for 32-bit or 64-bit builds on my system. So, with some more > detail on the specifics of the fix in the commit message: > > Acked-by: Bruce Richardson <bruce.richardson@intel.com> > I'm with Bruce. I'd like to know exactly whats going on here. I dont have an ARM system handy, so could you please post the errors that you are seeing here? Is ADDR_SIZE not defined on BE for ARM or some such? That seems like it should be fixed, rather than this change. Neil > > diff --git a/buildtools/pmdinfogen/pmdinfogen.c b/buildtools/pmdinfogen/pmdinfogen.c > > index e73fc76..9119e52 100644 > > --- a/buildtools/pmdinfogen/pmdinfogen.c > > +++ b/buildtools/pmdinfogen/pmdinfogen.c > > @@ -181,7 +181,7 @@ static int parse_elf(struct elf_info *info, const char *filename) > > sechdrs[i].sh_offset = > > TO_NATIVE(endian, ADDR_SIZE, sechdrs[i].sh_offset); > > sechdrs[i].sh_size = > > - TO_NATIVE(endian, 32, sechdrs[i].sh_size); > > + TO_NATIVE(endian, ADDR_SIZE, sechdrs[i].sh_size); > > sechdrs[i].sh_link = > > TO_NATIVE(endian, 32, sechdrs[i].sh_link); > > sechdrs[i].sh_info = > > -- > > 2.7.4 > > >
Hi Neil/Bruce, On 12/12/2017 12:28 AM, Neil Horman wrote: > On Mon, Dec 11, 2017 at 12:40:32PM +0000, Bruce Richardson wrote: >> On Thu, Nov 02, 2017 at 03:38:51PM +0530, Hemant Agrawal wrote: >>> cross compiling DPDK for BE mode on ARM results into errors >>> >>> "PMDINFO portal/dpaa2_hw_dpio.o.pmd.c No drivers registered" >>> >>> Fixes: 98b0fdb0ffc6 ("pmdinfogen: add buildtools and pmdinfogen utility") >>> Cc: Neil Horman <nhorman@tuxdriver.com> >>> Cc: stable@dpdk.org >>> >>> Signed-off-by: Jun Yang <jun.yang@nxp.com> >>> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com> >>> --- >>> buildtools/pmdinfogen/pmdinfogen.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >> >> Comment could be a bit more specific about what the problem is and how >> changing the hard-coded "32" fixes it. >> >> Haven't tested the cross compilation part myself, but this causes no >> errors for 32-bit or 64-bit builds on my system. So, with some more >> detail on the specifics of the fix in the commit message: >> >> Acked-by: Bruce Richardson <bruce.richardson@intel.com> >> > > I'm with Bruce. I'd like to know exactly whats going on here. I dont have an > ARM system handy, so could you please post the errors that you are seeing here? > Is ADDR_SIZE not defined on BE for ARM or some such? That seems like it should > be fixed, rather than this change. > > Neil > The original code hard codes the conversion for sh_size to 32, which is incorrect. The sh_size can be "Elf32_Word sh_size" for 32 bit and "Elf64_Xword sh_size" for 64 bit systems. This causes the symtab_stop to have reduced size and thus find can fail. info->symtab_stop = RTE_PTR_ADD(hdr, sechdrs[i].sh_offset + sechdrs[i].sh_size); we fixed it by replacing the hardcoded 32 with ADDR_SIZE is better. I don't have access to Intel BE compiler, so could not check behavior there. One of difference in my env is that I am doing cross compilation on intel-x86-64 machine. I used the following BE compiler https://releases.linaro.org/components/toolchain/binaries/6.4-2017.11/aarch64_be-linux-gnu/gcc-linaro-6.4.1-2017.11-x86_64_aarch64_be-linux-gnu.tar.xz >>> diff --git a/buildtools/pmdinfogen/pmdinfogen.c b/buildtools/pmdinfogen/pmdinfogen.c >>> index e73fc76..9119e52 100644 >>> --- a/buildtools/pmdinfogen/pmdinfogen.c >>> +++ b/buildtools/pmdinfogen/pmdinfogen.c >>> @@ -181,7 +181,7 @@ static int parse_elf(struct elf_info *info, const char *filename) >>> sechdrs[i].sh_offset = >>> TO_NATIVE(endian, ADDR_SIZE, sechdrs[i].sh_offset); >>> sechdrs[i].sh_size = >>> - TO_NATIVE(endian, 32, sechdrs[i].sh_size); >>> + TO_NATIVE(endian, ADDR_SIZE, sechdrs[i].sh_size); >>> sechdrs[i].sh_link = >>> TO_NATIVE(endian, 32, sechdrs[i].sh_link); >>> sechdrs[i].sh_info = >>> -- >>> 2.7.4 >>> >> >
On Wed, Dec 13, 2017 at 05:22:57PM +0530, Hemant Agrawal wrote: > Hi Neil/Bruce, > > On 12/12/2017 12:28 AM, Neil Horman wrote: > > On Mon, Dec 11, 2017 at 12:40:32PM +0000, Bruce Richardson wrote: > > > On Thu, Nov 02, 2017 at 03:38:51PM +0530, Hemant Agrawal wrote: > > > > cross compiling DPDK for BE mode on ARM results into errors > > > > > > > > "PMDINFO portal/dpaa2_hw_dpio.o.pmd.c No drivers registered" > > > > > > > > Fixes: 98b0fdb0ffc6 ("pmdinfogen: add buildtools and pmdinfogen utility") > > > > Cc: Neil Horman <nhorman@tuxdriver.com> > > > > Cc: stable@dpdk.org > > > > > > > > Signed-off-by: Jun Yang <jun.yang@nxp.com> > > > > Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com> > > > > --- > > > > buildtools/pmdinfogen/pmdinfogen.c | 2 +- > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > > > Comment could be a bit more specific about what the problem is and how > > > changing the hard-coded "32" fixes it. > > > > > > Haven't tested the cross compilation part myself, but this causes no > > > errors for 32-bit or 64-bit builds on my system. So, with some more > > > detail on the specifics of the fix in the commit message: > > > > > > Acked-by: Bruce Richardson <bruce.richardson@intel.com> > > > > > > > I'm with Bruce. I'd like to know exactly whats going on here. I dont have an > > ARM system handy, so could you please post the errors that you are seeing here? > > Is ADDR_SIZE not defined on BE for ARM or some such? That seems like it should > > be fixed, rather than this change. > > > > Neil > > > > The original code hard codes the conversion for sh_size to 32, which is > incorrect. > > The sh_size can be "Elf32_Word sh_size" for 32 bit and "Elf64_Xword > sh_size" for 64 bit systems. > > This causes the symtab_stop to have reduced size and thus find can fail. > info->symtab_stop = RTE_PTR_ADD(hdr, sechdrs[i].sh_offset + > sechdrs[i].sh_size); > > we fixed it by replacing the hardcoded 32 with ADDR_SIZE is better. > Oh, my bad, you're correct, I thought it was 32 bits for both ABI's Acked-by: Neil Horman <nhorman@tuxdriver.com>
diff --git a/buildtools/pmdinfogen/pmdinfogen.c b/buildtools/pmdinfogen/pmdinfogen.c index e73fc76..9119e52 100644 --- a/buildtools/pmdinfogen/pmdinfogen.c +++ b/buildtools/pmdinfogen/pmdinfogen.c @@ -181,7 +181,7 @@ static int parse_elf(struct elf_info *info, const char *filename) sechdrs[i].sh_offset = TO_NATIVE(endian, ADDR_SIZE, sechdrs[i].sh_offset); sechdrs[i].sh_size = - TO_NATIVE(endian, 32, sechdrs[i].sh_size); + TO_NATIVE(endian, ADDR_SIZE, sechdrs[i].sh_size); sechdrs[i].sh_link = TO_NATIVE(endian, 32, sechdrs[i].sh_link); sechdrs[i].sh_info =