From: David Marchand <david.marchand@redhat.com>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: Mingjin Ye <mingjinx.ye@intel.com>,
dev@dpdk.org, stable@dpdk.org,
Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Subject: Re: [PATCH] buildtools: fix invalid symbols
Date: Thu, 27 Jun 2024 14:39:59 +0200 [thread overview]
Message-ID: <CAJFAV8x42VKuBYv4cBvsN0PUQGaNuScujNQ0B3t2rQGAs9_BMg@mail.gmail.com> (raw)
In-Reply-To: <Zn1EEMwr54l6Ba-G@bricha3-mobl1.ger.corp.intel.com>
On Thu, Jun 27, 2024 at 12:57 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> On Thu, Jun 27, 2024 at 10:11:44AM +0000, Mingjin Ye wrote:
> > ELF files generated by higher version compilers wrap multiple
> > symbols prefixed with "this_pmd_name".
> >
> > This patch fixes the issue by filtering invalid symbols.
> >
> > Bugzilla ID: 1466
> > Fixes: 6c4bf8f42432 ("buildtools: add Python pmdinfogen")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>
> > ---
> > buildtools/pmdinfogen.py | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/buildtools/pmdinfogen.py b/buildtools/pmdinfogen.py
> > index 2a44f17bda..6ea97caec7 100755
> > --- a/buildtools/pmdinfogen.py
> > +++ b/buildtools/pmdinfogen.py
> > @@ -200,7 +200,8 @@ def dump(self, file):
> > def load_drivers(image):
> > drivers = []
> > for symbol in image.find_by_prefix("this_pmd_name"):
> > - drivers.append(Driver.load(image, symbol))
> > + if len(symbol.string_value) != 0:
> > + drivers.append(Driver.load(image, symbol))
>
> One small suggestion. Empty strings evaluate to boolean false, so the
> condition can just be simplified to:
>
> if symbol.string_value:
> drivers.append(....)
I have the same comment than what Ali tried with:
https://patchwork.dpdk.org/project/dpdk/patch/20240320155814.617220-1-alialnu@nvidia.com/
I would prefer we don't rely on the content of symbols (that we don't
know anything about) when we can filter on the symbol names exactly
which is something DPDK controls.
My suggestion is to filter symbol *names* with regex ^this_pmd_name[0-9]+$.
--
David Marchand
next prev parent reply other threads:[~2024-06-27 12:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-27 10:11 Mingjin Ye
2024-06-27 10:50 ` Bruce Richardson
2024-06-27 12:39 ` David Marchand [this message]
2024-06-27 11:30 ` David Marchand
2024-07-01 10:33 ` [PATCH v2] " Mingjin Ye
2024-07-03 16:13 ` David Marchand
2024-07-05 8:25 ` [PATCH v3] " Mingjin Ye
2024-07-05 18:08 ` Ali Alnubani
2024-07-11 11:39 ` David Marchand
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=CAJFAV8x42VKuBYv4cBvsN0PUQGaNuScujNQ0B3t2rQGAs9_BMg@mail.gmail.com \
--to=david.marchand@redhat.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=dmitry.kozliuk@gmail.com \
--cc=mingjinx.ye@intel.com \
--cc=stable@dpdk.org \
/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).