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 1A6F045563; Wed, 3 Jul 2024 18:13:43 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 08CF34279A; Wed, 3 Jul 2024 18:13:43 +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 98B974111C for ; Wed, 3 Jul 2024 18:13:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1720023221; 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=PDPPd71DDscm18s341D3X/RDRKFNZIPjDLvn9+zCBz0=; b=QjoF4j9UeXylpabYossx93V6P/xCh8fd37N6SRL2i02Kzjc/pI3TKrnL/vJwse2kSWrWBI EVrdj4csnlvpbf7yBKWwxKb0a9GN3ncOz/tlZ7LP5najBdEteWcuVHpMMPC7aaIYg1BBbO fiKpousXG7CfvYIxIaUiwui0ew8ETJk= Received: from mail-lj1-f199.google.com (mail-lj1-f199.google.com [209.85.208.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-344-4gu6FH3YNrif69BBhJiPLQ-1; Wed, 03 Jul 2024 12:13:37 -0400 X-MC-Unique: 4gu6FH3YNrif69BBhJiPLQ-1 Received: by mail-lj1-f199.google.com with SMTP id 38308e7fff4ca-2ee8749d703so4726351fa.0 for ; Wed, 03 Jul 2024 09:13:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720023215; x=1720628015; 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=PDPPd71DDscm18s341D3X/RDRKFNZIPjDLvn9+zCBz0=; b=iLbLKW4b5t/tUjw3bjBxEJpcKBCKwDFQioTIH9KFvaBEu8Z53djR91FVRjBjPZs0Gf JiGrpQVueJGo9uQb9ObLEqKX2lGqZtEj2OnoW1TatOux6kjTBND7XTCf2DfAnQVgZjnO 5GOhUawXe3pt0S6y74irBqAeDZK5wWkSN6YjwungkhhMNFLmv0wLIVqms3DcWYGg19RS AGDU9bON8DhDeP6LBa065dZh6jGr1MTQqS/s4vjXjk6W4VL57ah8aoxAl/StcOUcokIm xvZz+aDkcNI3842SqWY0hnmk/mUbWBMHnZbBRYZ4dTJkU0EyqtuJJDHUqGUveeQAMa4U oc+A== X-Gm-Message-State: AOJu0YwFz3gdHKQNk+9X18OapGQDljv7GT++llClL7G9mjpMnI63SUed 9UiC0zT41n1VFNW5GjEWlFoRGXb7taxC5lE/dcYhEjoPdiRJrLRYclWyJ+JwFVlhDWuyg662moZ ECc/eoeHs0IMW1M4ZhZzSi9GpAOSKpJhZDzzBnLI9bG+OLqNDPWe4otR6+xH8JdEFLndQVgkJcP BcoV5J49qH3W+ouCk= X-Received: by 2002:a2e:9b8a:0:b0:2ee:7d37:49a7 with SMTP id 38308e7fff4ca-2ee84a21487mr6146311fa.3.1720023215742; Wed, 03 Jul 2024 09:13:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFuTZ/HFiH7FPVCz/nNZ9jGEaNGSMERDoslSndvae0LhRgPUy12zKKagTUUUp8KUmA9OENR8+iSgZC0c6c2/jw= X-Received: by 2002:a2e:9b8a:0:b0:2ee:7d37:49a7 with SMTP id 38308e7fff4ca-2ee84a21487mr6146251fa.3.1720023215360; Wed, 03 Jul 2024 09:13:35 -0700 (PDT) MIME-Version: 1.0 References: <20240627101144.665413-1-mingjinx.ye@intel.com> <20240701103315.835249-1-mingjinx.ye@intel.com> In-Reply-To: <20240701103315.835249-1-mingjinx.ye@intel.com> From: David Marchand Date: Wed, 3 Jul 2024 18:13:23 +0200 Message-ID: Subject: Re: [PATCH v2] buildtools: fix invalid symbols To: Mingjin Ye Cc: dev@dpdk.org, stable@dpdk.org, Dmitry Kozlyuk , Ali Alnubani 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 Adding Ali in the loop, as he was working on a similar patch. On Mon, Jul 1, 2024 at 12:56=E2=80=AFPM Mingjin Ye = wrote: > > Elf files generated by higher version compilers wrap multiple > symbols prefixed with "this_pmd_name". > > The patch uses the regex "^this_pmd_name[0-9]+$" to match the > symbol name. > > Bugzilla ID: 1466 > Fixes: 6c4bf8f42432 ("buildtools: add Python pmdinfogen") > Cc: stable@dpdk.org > > Signed-off-by: Mingjin Ye > --- > v2: Use regex ^this_pmd_name[0-9]+$ to filter symbols *names* > --- > buildtools/pmdinfogen.py | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/buildtools/pmdinfogen.py b/buildtools/pmdinfogen.py > index 2a44f17bda..0fbcc697ed 100755 > --- a/buildtools/pmdinfogen.py > +++ b/buildtools/pmdinfogen.py > @@ -6,6 +6,7 @@ > import argparse > import ctypes > import json > +import re > import sys > import tempfile > > @@ -70,7 +71,7 @@ def find_by_prefix(self, prefix): This function does not find symbols with a prefix anymore... Please rename. > prefix =3D prefix.encode("utf-8") if self._legacy_elftools else = prefix > for i in range(self._symtab.num_symbols()): > symbol =3D self._symtab.get_symbol(i) > - if symbol.name.startswith(prefix): > + if re.match(prefix, symbol.name): > yield ELFSymbol(self._image, symbol) > > > @@ -199,7 +200,7 @@ def dump(self, file): > > def load_drivers(image): > drivers =3D [] > - for symbol in image.find_by_prefix("this_pmd_name"): > + for symbol in image.find_by_prefix("^this_pmd_name[0-9]+$"): > drivers.append(Driver.load(image, symbol)) > return drivers The COFF implementation is probably broken by this change as it is still filtering symbols with a prefix. Please update. --=20 David Marchand