From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 78EFC4550B; Thu, 27 Jun 2024 14:41:53 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9BA7F40E40; Thu, 27 Jun 2024 14:41:52 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 6FB0B40E31 for ; Thu, 27 Jun 2024 14:40:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1719492015; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+g8tPMHmjpLOhHBX0/qECAEab0Anu+Qn/wzzngFWsgc=; b=aSIwa+1AFGi0ozjYE/BhU0DF9XPFHiil2TRv4uX6TxB2v6GWfIrLNH4YBp8hjkr5t/f8nE l/rvJcgDghMgSfbxvCS8v0LnmGFXTgJ2zOR9Pmfu1afuv1znJ8dB30VPGnQtidxEp4t2o/ 3l/6tjx0mfw7T0n8af9pCqp7jsEUzOE= Received: from mail-lj1-f198.google.com (mail-lj1-f198.google.com [209.85.208.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-164-0bXuI_p4M1KjAFNh3xIlsg-1; Thu, 27 Jun 2024 08:40:13 -0400 X-MC-Unique: 0bXuI_p4M1KjAFNh3xIlsg-1 Received: by mail-lj1-f198.google.com with SMTP id 38308e7fff4ca-2ee45dea727so15253361fa.2 for ; Thu, 27 Jun 2024 05:40:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719492012; x=1720096812; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+g8tPMHmjpLOhHBX0/qECAEab0Anu+Qn/wzzngFWsgc=; b=bWrTSOMAR3R9mI73NeOn/T7DeVumHMvF2ZapObit4HlbfZ9T5zl9AQXjYxGFvENS8D 7aqleWNkyQxK95y5O+CrPYWSVa0EH/Jyp7tB9CtPhKaYL68woKlQVz1Qm49AkasVG0eh iKfkvhrr3PFrYxbksUo++RDd5IL0uX5L+mRaDRvA0+58i2CmofrtBm5Kh7+SzFuORv3u dRE/5xYqeUNjDeCOsfTosKSmYzBhGfbEsbIKksPo1ikRwFxka616+Rlm8Y5cfdQKpGbT +RtDM1TGiCBqEEBZhti4fiIWJgF5ZMHz1RwLxBHzzGBvBAc6ANfbTZDonPrdw/qtNWH8 7qrg== X-Forwarded-Encrypted: i=1; AJvYcCX+S9h4ecCVRp/xd32HP0T8gQcvcld5cLs5UjxILe+Okf6kwJ0LQhGgeINVSSZQP6K8v0wwQrMZNnj3gr0= X-Gm-Message-State: AOJu0YyEAFfrVrwZW7gP9WqBgsnwrYqWWoo8JB3Dxzgvgsp7fLOxM3ul GF086GNeimJdOsndlWm5NY7UcmTBmomUoAI0h8tf2WO+Rd7RaXWZL2KnEOALJCISOf+oRF2Tw0u FBHFqAzIHur2217KW0LXxgRODLSXctfYbNtbpcq1a+ARgoc2RUq6BqtZDLtBCRh84PFnUX2fap9 SQOCJyS9SqH8rA5Sk= X-Received: by 2002:a2e:8e8d:0:b0:2ee:45e0:3550 with SMTP id 38308e7fff4ca-2ee45e036d3mr30067831fa.32.1719492011865; Thu, 27 Jun 2024 05:40:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFH9nxwbPyuDyL++LXKCmF4QGePhZdmVAoHcLeHmOrSYc2eItd93um3s/qyHbQvGkNbp9Ybhkk1jopTKT1LLjI= X-Received: by 2002:a2e:8e8d:0:b0:2ee:45e0:3550 with SMTP id 38308e7fff4ca-2ee45e036d3mr30067611fa.32.1719492011439; Thu, 27 Jun 2024 05:40:11 -0700 (PDT) MIME-Version: 1.0 References: <20240627101144.665413-1-mingjinx.ye@intel.com> In-Reply-To: From: David Marchand Date: Thu, 27 Jun 2024 14:39:59 +0200 Message-ID: Subject: Re: [PATCH] buildtools: fix invalid symbols To: Bruce Richardson Cc: Mingjin Ye , dev@dpdk.org, stable@dpdk.org, Dmitry Kozlyuk X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Thu, Jun 27, 2024 at 12:57=E2=80=AFPM Bruce Richardson 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 > > --- > > 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 =3D [] > > for symbol in image.find_by_prefix("this_pmd_name"): > > - drivers.append(Driver.load(image, symbol)) > > + if len(symbol.string_value) !=3D 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-alial= nu@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]+$. --=20 David Marchand