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 9D8564550B for ; Thu, 27 Jun 2024 14:41:52 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 754EA40E01; 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.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 25AA140E01 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=1719492014; 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=fm0QXSANgXkZ4m0aa+U1+95cwLqMeEOS9yqf7h87+KKnoGK9wCeHwoFxUtx603mBboCLJR kz0zdZZA/8HXiTf933inp07d59vm7vmVjOcesiOg7DJ9aSm+Pc8kv0yCzogTkeLTrJ61Mk 0mK4mfjds4qFeUelS/hoqQATbp932hY= 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-531-UUlzeKiWOlKGgUMnx1rL1Q-1; Thu, 27 Jun 2024 08:40:13 -0400 X-MC-Unique: UUlzeKiWOlKGgUMnx1rL1Q-1 Received: by mail-lj1-f198.google.com with SMTP id 38308e7fff4ca-2ec5e1ee629so41763091fa.0 for ; Thu, 27 Jun 2024 05:40:12 -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=FmMJvnLb2scUkyHfLjjfyX40+ct5V84VPnNQQk+QbQc4EYyXaaGXw03YhR1UPYfPfT 8Nf2Wjx4lmR9eVjJU/rpjyCKBmZUp/b3vTh+ezkwYv2Xi/ZKJkHPJzKrJxgRwCvPMV/Y j8F0FCz1wrXFPAO6/eYJHHUuL7DSz4+L3e4uIN93snjDC2fkU5D6e1VMDalO0dhs9KHa zyZb121IQiwjEUwkiBIue7JF6TDgKVhUDXELN+kaRFAwQB/MKrjxym1OIYCIUfXNvAKe jMb2R94HV+5Kg6o9K5hwTMED7kPc7tcQgoHDLgYbgcTpInss6r3Sof8akWoO+3D8iSzJ aH2Q== X-Forwarded-Encrypted: i=1; AJvYcCX7MQz1eMnWo8naRaRjKAH4MYQeRuXqzk6pCpOw3skjdOxnIlVH8v+yHJqzjWhJQEZgCaTxmLgIV8HKn1h+bCU= X-Gm-Message-State: AOJu0Yw96oBzZXawDd+w1e8QuWp7oLxYfo7RQeeL4WQ0tfV3X2KCT1XN CFetMQTIGQIZTP4oTHYjZolV8lyiIaIhWqG7YMIq9aG35kGuAeAqlzb5bIzbchZlVfskn/lcf83 /MUu8TRT6M2eGSAjOM+8x6n1SE9LXBtrf9MV2d1IlZ9XDXKy9+kit/CPoUpXKpffoFIWWGk4Q1u 6ZxWkew5G7h/p5n8Mtvko= X-Received: by 2002:a2e:8e8d:0:b0:2ee:45e0:3550 with SMTP id 38308e7fff4ca-2ee45e036d3mr30067841fa.32.1719492011866; 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: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-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