From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C8EB1A04E7; Tue, 3 Nov 2020 21:21:02 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 224905B3C; Tue, 3 Nov 2020 21:21:01 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by dpdk.org (Postfix) with ESMTP id E3606592C for ; Tue, 3 Nov 2020 21:20:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604434856; 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: in-reply-to:in-reply-to:references:references; bh=ptNU+GRI49U1iSrAJUpVO7+06E810SEYx+ABmXjM2eA=; b=WwTf/nV0JJAQRkBiOue07fQT9wSkRFVZQiC0cy1Z0C6jwUN4HO9PGKqF3feQ4yMO7qyVZ2 1HC5InQGbhdj4qLrTTr5NDkwgIs6LZ15c7lzYcfgLeTkoXa/KeOM+/IM2iI4BUwhYSJO7L HaeoSVJOPUfhX/cEBQuePNJWTEwRW4I= Received: from mail-vk1-f199.google.com (mail-vk1-f199.google.com [209.85.221.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-343-2EJgyommOQSaGWMssKjhEA-1; Tue, 03 Nov 2020 15:20:54 -0500 X-MC-Unique: 2EJgyommOQSaGWMssKjhEA-1 Received: by mail-vk1-f199.google.com with SMTP id t139so3226406vkd.13 for ; Tue, 03 Nov 2020 12:20:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ptNU+GRI49U1iSrAJUpVO7+06E810SEYx+ABmXjM2eA=; b=oRTIPNP9ND/HGrA+MKN4mQZYD5DTmaXtniZA+pV3RIajjMb9lYU3uT9ftnu6tWNb7i HSNLzianSW676c4tH0zQMC4XwPXgk7/ecpTwIE+5F/ya77vZVZM3Blr8B2QQVvIZYfUe PZ9Ppkuc1S+GjEoc/pvhq5Zbl5FiFtSjybqHcB3QTwAp2u3Zw28Ox+gFOd2oxEICKMuv 7p93g325WYGMdNaBZtJ4TLbgrr7a3crKGOlMZ52wq8CjNwemxwxY9S2n951o8rci4sNS CQHXF88ven8UPAFViKWqBd9O0EfUEMpSaaEZKXUPwajZNIwrwk1ZJvAxQzgtbEufoCKc pfKw== X-Gm-Message-State: AOAM533IcNJa9sTI09+poH62DyI3Jzc6Hi4awNCwWXODg/6oZVfqoR3T xi6txB34eRku9yZQUbT3vu6BPI6qcIthLAxfQjVQzUNAU3sn/zJcTctfV7vpAKPnkACKwwEuH/o galk4s3DRV60m0l2wi88= X-Received: by 2002:a1f:1889:: with SMTP id 131mr17046045vky.20.1604434854383; Tue, 03 Nov 2020 12:20:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJz0AGDF+UMLwSTwVDp23ZlMTTDSk8qrQRq3rV84s4aD/xZXooFxv7P+BH+KuhtfA1QWUQSrfYtZXPmvL6C+agw= X-Received: by 2002:a1f:1889:: with SMTP id 131mr17046028vky.20.1604434854159; Tue, 03 Nov 2020 12:20:54 -0800 (PST) MIME-Version: 1.0 References: <20201103183906.8088-1-david.marchand@redhat.com> <20201103192750.zr6gh3oz3wjnbeys@6wind.com> In-Reply-To: <20201103192750.zr6gh3oz3wjnbeys@6wind.com> From: David Marchand Date: Tue, 3 Nov 2020 21:20:43 +0100 Message-ID: To: Robin Jarry Cc: dev , Bruce Richardson , Neil Horman , Rosen Xu , Andrew Rybchenko , Luca Boccassi Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH] usertools: fix pmdinfo parsing X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, Nov 3, 2020 at 8:27 PM Robin Jarry wrote: > 2020-11-03, David Marchand: > > This script was using the librte_pmd prefix has a filter to follow as* > > DT_NEEDED entries. > > Now that we changed the driver names, update this heuristic with an > > explicit list of device classes. > > > > Fixes: a20b2c01a7a1 ("build: standardize component names and defines") > > > > Signed-off-by: David Marchand > > --- > > usertools/dpdk-pmdinfo.py | 5 ++++- > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > diff --git a/usertools/dpdk-pmdinfo.py b/usertools/dpdk-pmdinfo.py > > index 1661982791..687a9fd032 100755 > > --- a/usertools/dpdk-pmdinfo.py > > +++ b/usertools/dpdk-pmdinfo.py > > @@ -450,7 +450,10 @@ def process_dt_needed_entries(self): > > for tag in dynsec.iter_tags(): > > # pyelftools may return byte-strings, force decode them > > if force_unicode(tag.entry.d_tag) == 'DT_NEEDED': > > - if 'librte_pmd' in force_unicode(tag.needed): > > + words = force_unicode(tag.needed).split('_') > > + if words and len(words) >= 3 and words[0] == 'librte' and \ > > + words[1] in ['baseband', 'compress', 'crypto', 'event', > > + 'net', 'raw', 'regex', 'vdpa']: > > This code is already ugly and I don't have much better to suggest... Less ugly with a regular expression? if re.match(r"^librte_(baseband|compress|crypto|event|net|raw|regex|vdpa)_", force_unicode(tag.needed)): -- David Marchand