From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0045.outbound.protection.outlook.com [104.47.34.45]) by dpdk.org (Postfix) with ESMTP id 12608107A; Wed, 13 Dec 2017 12:53:05 +0100 (CET) Received: from BN3PR03CA0112.namprd03.prod.outlook.com (10.174.66.30) by BN3PR03MB2354.namprd03.prod.outlook.com (10.166.74.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.9; Wed, 13 Dec 2017 11:53:03 +0000 Received: from BL2FFO11OLC001.protection.gbl (2a01:111:f400:7c09::151) by BN3PR03CA0112.outlook.office365.com (2603:10b6:400:4::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.302.9 via Frontend Transport; Wed, 13 Dec 2017 11:53:03 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; tuxdriver.com; dkim=none (message not signed) header.d=none;tuxdriver.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 BL2FFO11OLC001.mail.protection.outlook.com (10.173.161.185) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.282.5 via Frontend Transport; Wed, 13 Dec 2017 11:52:56 +0000 Received: from [10.232.133.65] ([10.232.133.65]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id vBDBqvTN026982; Wed, 13 Dec 2017 04:52:58 -0700 To: Neil Horman , Bruce Richardson References: <1509617335-6354-1-git-send-email-hemant.agrawal@nxp.com> <20171211124032.GA11536@bricha3-MOBL3.ger.corp.intel.com> <20171211185813.GE18284@hmswarspite.think-freely.org> CC: , , , Jun Yang From: Hemant Agrawal Message-ID: <16de48c2-0ba7-951a-b8bf-3409cead8663@nxp.com> Date: Wed, 13 Dec 2017 17:22:57 +0530 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20171211185813.GE18284@hmswarspite.think-freely.org> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131576395768041508; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(7966004)(336005)(39860400002)(346002)(376002)(39380400002)(2980300002)(1109001)(1110001)(339900001)(189003)(199004)(24454002)(104016004)(68736007)(36756003)(6306002)(498600001)(230700001)(81166006)(65826007)(50466002)(5660300001)(23746002)(31686004)(6246003)(53546011)(8676002)(2950100002)(305945005)(53936002)(97736004)(4326008)(81156014)(64126003)(356003)(106466001)(105606002)(229853002)(2906002)(65956001)(54906003)(575784001)(316002)(966005)(31696002)(86362001)(76176011)(59450400001)(8936002)(67846002)(77096006)(110136005)(85426001)(83506002)(58126008)(47776003)(8656006)(65806001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR03MB2354; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11OLC001; 1:+4MNB56Kfg3gmrikYkesLpx3YBkzVewkyOPsObK8Wf2n+yDLvyOI03ajoW5TILhe+8YNFX+m8wx19zS+PrXbUjuoe2snWFgLsBS4iGu1qDJWbtb/vh2lkdSkGVEObwrZ X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b59fbd44-f9e4-4806-9024-08d542200d0b X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4628075)(201703131517081)(5600026)(4604075)(2017052603307); SRVR:BN3PR03MB2354; X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2354; 3:eTk+6oXb9DrNhfJcI7sxh1W8OoArxyaO2m3r3f1fQ4nEvfxMkxJsUwVq/j/CUeitolerSHKy1Cs2LtT6wLRCvdekXZ4D802JgT3HouH+89KD/TBV95N7LGVleOLasXv1k/80NRicuHzcsey4iH/bw3Ba1CkcrO7wHY/sOxV2nMu/aSTFyIjzV9XS53HsIMGrSoC5Udl5q/E8k5sLbvtT1YmLnshjEOMuDXV/Idg1MhqaBT/kjJwdws8oLlC4uczoRjkJ8d5Ft8V3E73tMU5qKC9i6HBESmUfDyx+qRfAox1dmgFlV0JIm3fCW/RdNxDgBdFfu8LL/e/jLf8YPnsRan1m5qzDZ3VrF0rq3a6j2M0=; 25:5sOgBj9Xbyz2W8EED7PaWqfmNdoTM6LZ3STEv3HO2c7yDMz12w80jJt8ei1PzfLgx66f+JKvKFrx52Wdch1Wk13QLjlqaCsonosGC/NlQWKVSPiUzt5D2NB0uKHp4/VepcslXZgohwuT2ZDb0NXc7Yk/3lRrMY8KGVdJDpUoi1cXlpk+QHV/SVq1xYCziZqn0Pgc0LsjFemiGYcf6iham6zNDk1VZMdSCTiscq1M9zD5XllS/NuJrff3OP2hWlnJH6TMK/WmVZBjWE0hHIuWDkMXignycC3NKJpvEmfLijHRGrmNNdJXBC5WeApe0jddqmhH4uPdYULWqkaa5iVnNg== X-MS-TrafficTypeDiagnostic: BN3PR03MB2354: X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2354; 31:b2IGwgjmUbD+U/eHokJHiZ/w1vGtYQKPGaGVhw5yMQUeCngIDlLWlYeX1Vr4qUIOrdJKbB5Kd6NhN7uEraxX4qAZg/4x0QxwR/G5RqlsTkk/TFFsaNoNE4s3Jv6Zz2RpUC27YatFpeG+8Mu12wSqUtpj4OsrdC3pHSY3cGGL27z8ioH+RFOp6GdWrjUIoZYnHiOvhyRxb4Uu6Wg45GKvOcFhH69tBmmSsH0IxiuQF/s=; 4:ZZiZA4kxWaEet55QWeH7S9HilbrRqZ0nNF8Pb9duunHeeNiTINg7usQS8PLlxZXdSBq54+bDtjAwJ2EJB9PjFStCfchH7ivE5ghs1RonjHid8Yv2PAAlKZJFUnoUUe6EOOkcNR7AzHAKzQehOo/ipITvAqDlwJo0nDrzYvZ7gm7yPsg6TtJdODdUJtyU+b+oJFo6HlhExKyGKZa+FKyLS3Bubm0L+29bwlGbRvliIjvDRRVuRF3Yy1ATgNM9JRfmTB7HdarKbKEEomGyPfSS4H+vDLp6P9KJ0lwo3/OBNrcW+afVQ0Pqns/3h9O0+12rDnnu/WiRTjdJ8CAnJ94fVtqsJcNuHO3uHXYvvgZZ7J7GnF+Xc8EdNY+4McP0R02y X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(5005006)(8121501046)(10201501046)(3002001)(3231023)(93006095)(93001095)(6055026)(6096035)(201703131430075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(20161123559100)(20161123556025)(20161123563025)(20161123565025)(20161123561025)(201708071742011); SRVR:BN3PR03MB2354; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:BN3PR03MB2354; X-Forefront-PRVS: 052017CAF1 X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; BN3PR03MB2354; 23:yRTDSs7m0dtdqetesTRh4yfXVSpd04v9KCb7L?= =?Windows-1252?Q?T8Tyw2XcZSYknOmUtw4hy1S8eHrCEneXQ74jVAJNVaKveZV+UTPfJorP?= =?Windows-1252?Q?UghN+tUlSq/q/2nm4QxPuGWosm3rj9M4pS51UjmoBgEYhOoZ8Y5imRXL?= =?Windows-1252?Q?zJgVqBYuHqw1NqzorrJ2LqwnRSZdWj7Ns7SaH92V0zJ0dQhgnngQy71X?= =?Windows-1252?Q?Qabt+56mSnMd2P552MrkspyT7oZ9sVV16Df3PR/KNm7Cz8jVd1P5unlJ?= =?Windows-1252?Q?9aCsOezIow8qrkvA8esS2VXEY0AhZzJlz1OBejzcYRq4xIUsrtNHmXeF?= =?Windows-1252?Q?hm6L8x3tIrCOiRxrAJ+c3iEUF6NZ1uzNhDC+ljmGcB3X8tM6vprhgkH2?= =?Windows-1252?Q?ziHLrKm4EJGBRLqscm+Wu3D1UW4MbB5+OWNGgt8R0sDyRN30KBxajQQn?= =?Windows-1252?Q?ToHPQ25ssfov8xCuQzJRyScbrM3kLSTw4AcULJTVtBjHO72QQEbvh2Rj?= =?Windows-1252?Q?3ZwSiLFTBk4wYQNfhchDcq/e/ClOGqm3poqpC50+6nwi5ot5mGOvkZ/M?= =?Windows-1252?Q?O/GzEDDdL/ALk4bKxJnvKVnwjS3+F+887KCneswGaLnq+7+jawv58Ltq?= =?Windows-1252?Q?37RfGUz+Fl3yB9/V8gW1cEmLDJzj8Y73NNWJN+mKgQUvgV4jOt1npKtG?= =?Windows-1252?Q?xZt2UqXksiRLNwWdjnOFHcCZiJVe99Sv4ofHhxwX598lNil+bmnfq235?= =?Windows-1252?Q?B88T9KFrskO3upFmQAECAYbgqfLmlGFSIZxMzoD8hy2Uy9Pqq1hzg3At?= =?Windows-1252?Q?gMdnX7vH4gFLhPJYd+kIhO00CjfRP1j8Re93WZxNkKfId/4aV+CVCi4Y?= =?Windows-1252?Q?uC+73xOebRepWpdemkdwX3n1kwo4G8Isx24SxW/OxZCer/fnjdmxrlt+?= =?Windows-1252?Q?CvaaIHP703ITCy+hP12UhEUMVQTybPVEn2Ou9Wb/JoJ0hk79gAdb4Rl7?= =?Windows-1252?Q?IZwxqaERQBLndbX1PzDCU5cI9OF/UL7Ag2ohv4OiImTb8X1v5Ogy9Cs1?= =?Windows-1252?Q?P3SJeiU+HbSEAQ+cmMeCQPjtlnk4X82DHKwbzP8JMm+hh9RRemKmfajf?= =?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1hn4yRZKHjFP4c52pe53kiKIzUMlE+P5OH5yqgHX8q0sBAxTGeO3nQcRleAJe/OS0aKi8Y=; 7:R7hnFxke97pkcWzizTyB97sQmZLquOBsfMvX4grLCsPtvhn7ge8FFGkGp4GvIllfxLX7OfsT9JmlLXcdQKcaJt6zhO1pGHBgBtChUwDHPiTwmTJm4+ST4OeBwv/MdoXuvT34V2X0rgA5y1q2BlV/sJW++dlrd0iTjDcKdr5CEHX4rI2eJWaXrxigA5Rx8EhiBmRij+r39ICaH2j5mBZy2aO/a1YAfIn7GQarQHOnR8DuADM5tTePUVtzsJAWtjAB SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Dec 2017 11:52:56.6013 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b59fbd44-f9e4-4806-9024-08d542200d0b 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: BN3PR03MB2354 Subject: Re: [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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 11:53:05 -0000 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 >>> Cc: stable@dpdk.org >>> >>> Signed-off-by: Jun Yang >>> Signed-off-by: Hemant Agrawal >>> --- >>> 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 >> > > 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 >>> >> >