DPDK patches and discussions
 help / color / mirror / Atom feed
From: Hemant Agrawal <hemant.agrawal@nxp.com>
To: <dev@dpdk.org>
Cc: <thomas@monjalon.net>, Neil Horman <nhorman@tuxdriver.com>,
	<stable@dpdk.org>, Jun Yang <jun.yang@nxp.com>
Subject: [dpdk-dev] [PATCH v2 1/5] pmdinfogen: fix cross compilation for ARM BE
Date: Wed, 13 Dec 2017 18:22:54 +0530	[thread overview]
Message-ID: <1513169578-28440-1-git-send-email-hemant.agrawal@nxp.com> (raw)
In-Reply-To: <1509617335-6354-1-git-send-email-hemant.agrawal@nxp.com>

Cross compiling DPDK for BE mode on ARM results into errors
"PMDINFO portal/dpaa2_hw_dpio.o.pmd.c No drivers registered"

The original code assumes the sh_size to be 32 bit, while it can
be Elf32_Word or Elf64_Xword based on 32bit or 64 bit systems.

This patches replaces the sh_size conversion routines to use ADDR_SIZE

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>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
--
v2: add descriptions and one more place for fix

 buildtools/pmdinfogen/pmdinfogen.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/buildtools/pmdinfogen/pmdinfogen.c b/buildtools/pmdinfogen/pmdinfogen.c
index 96ccbf3..b07dbcf 100644
--- a/buildtools/pmdinfogen/pmdinfogen.c
+++ b/buildtools/pmdinfogen/pmdinfogen.c
@@ -158,7 +158,8 @@ static int parse_elf(struct elf_info *info, const char *filename)
 		 * There are more than 64k sections,
 		 * read count from .sh_size.
 		 */
-		info->num_sections = TO_NATIVE(endian, 32, sechdrs[0].sh_size);
+		info->num_sections =
+			TO_NATIVE(endian, ADDR_SIZE, sechdrs[0].sh_size);
 	} else {
 		info->num_sections = hdr->e_shnum;
 	}
@@ -181,7 +182,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

  parent reply	other threads:[~2017-12-13 12:54 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-02 10:08 [dpdk-dev] [PATCH " Hemant Agrawal
2017-11-02 10:08 ` [dpdk-dev] [PATCH 2/5] lpm: fix compilation on " Hemant Agrawal
2017-12-11 12:41   ` Bruce Richardson
2017-12-13 12:23     ` Hemant Agrawal
2017-11-02 10:08 ` [dpdk-dev] [PATCH 3/5] bus/dpaa: " Hemant Agrawal
2017-11-02 10:08 ` [dpdk-dev] [PATCH 4/5] net/i40e: " Hemant Agrawal
2017-11-03  3:03   ` Xing, Beilei
2017-11-02 10:08 ` [dpdk-dev] [PATCH 5/5] net/ixgbe: " Hemant Agrawal
2017-12-11 12:42   ` Bruce Richardson
2017-12-11 12:40 ` [dpdk-dev] [PATCH 1/5] pmdinfogen: fix cross compilation for " Bruce Richardson
2017-12-11 18:58   ` Neil Horman
2017-12-13 11:52     ` Hemant Agrawal
2017-12-13 12:19       ` Neil Horman
2017-12-13 12:52 ` Hemant Agrawal [this message]
2017-12-13 12:52   ` [dpdk-dev] [PATCH v2 2/5] lpm: fix compilation on " Hemant Agrawal
2017-12-13 13:22     ` Bruce Richardson
2017-12-18  7:50       ` Hemant Agrawal
2017-12-13 12:52   ` [dpdk-dev] [PATCH v2 3/5] bus/dpaa: " Hemant Agrawal
2017-12-13 12:52   ` [dpdk-dev] [PATCH v2 4/5] net/i40e: " Hemant Agrawal
2017-12-13 12:52   ` [dpdk-dev] [PATCH v2 5/5] net/ixgbe: " Hemant Agrawal
2017-12-18  7:56   ` [dpdk-dev] [PATCH v3 1/5] pmdinfogen: fix cross compilation for " Hemant Agrawal
2017-12-18  7:56     ` [dpdk-dev] [PATCH v3 2/5] lpm: fix compilation on " Hemant Agrawal
2017-12-18  7:56     ` [dpdk-dev] [PATCH v3 3/5] bus/dpaa: " Hemant Agrawal
2017-12-18  7:56     ` [dpdk-dev] [PATCH v3 4/5] net/i40e: " Hemant Agrawal
2017-12-18  7:56     ` [dpdk-dev] [PATCH v3 5/5] net/ixgbe: " Hemant Agrawal
2018-01-12 16:27     ` [dpdk-dev] [dpdk-stable] [PATCH v3 1/5] pmdinfogen: fix cross compilation for " Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1513169578-28440-1-git-send-email-hemant.agrawal@nxp.com \
    --to=hemant.agrawal@nxp.com \
    --cc=dev@dpdk.org \
    --cc=jun.yang@nxp.com \
    --cc=nhorman@tuxdriver.com \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).