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 67AF6A0553; Mon, 17 Feb 2020 10:54:18 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 88EF01DB97; Mon, 17 Feb 2020 10:54:17 +0100 (CET) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by dpdk.org (Postfix) with ESMTP id 5717E1DB96 for ; Mon, 17 Feb 2020 10:54:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581933255; 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=QCeekH+VWh7LugIv5oxRuHHIB60FH6KkvrFRbkarIvg=; b=dFQ1Z6X9TIF7gq+HjUl4dEfxog+PN8gLGyZEhfVyx2FdYqHiAIh2/i2qWJWWx9uDlw3xiE 2aZS59/VWtuYdNrNn8zeQNyBTaGT4Q8hnn4ANvgNhmC8dZZV9tcaA5Qmnhu3RFS0G9OhJ9 k5bS0A/gn3T5DheFsRFENihH0NNvnWw= Received: from mail-vs1-f72.google.com (mail-vs1-f72.google.com [209.85.217.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-85-51UOptl0OjuM0EWviVUOTw-1; Mon, 17 Feb 2020 04:54:13 -0500 Received: by mail-vs1-f72.google.com with SMTP id z3so1181749vsp.1 for ; Mon, 17 Feb 2020 01:54:13 -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=PPaBM/y3a1t5pfLSSaMKOVb/VD/01cEfZxDaLamXOYM=; b=S9B4t97e0LZh5ISQO5TuXqL80E3EAWvQI7tOJ4w73MckWEWdDYKFau07WY/ktK79jw k8DadalIb51jhG0v1xSKyRNWIOcRDLHha+BpJvirPnVotKmzGITY5gXERz+r/Y3AfvUY cOAt7fLCpF2deDpfKunuMpGTOgkQSXnLxASyiDjF+AsPlEQstnRw+9rZXhevfbkuNbP7 iErqTbdq8oEf2d/XH6I2L9CvD5se5Fyx5Nm6rDuGU215440L7tJXXne2A1zCepN7Uvre 3EcmupKcocJLQIVNH+N0yBSbgkdvxbl3H5saY9/dTWK267JpnOl/iPsrDqiQtRXlQJEx +oGg== X-Gm-Message-State: APjAAAVU+DZtQStNpKTLKZmv4KW/IKDnVxw+pwf3+c5qbCsDaRZzHGGi /aHHeF3DYMg4J0xHEpRv+LZtSx3pD/AXKzdqCbXh7xNu6QB5ro/1Id/jtIUxG7EC7aIcIQ0vVCe ZUsMYpe6kpgOpGUKBvx4= X-Received: by 2002:a67:f1ca:: with SMTP id v10mr7829257vsm.180.1581933253282; Mon, 17 Feb 2020 01:54:13 -0800 (PST) X-Google-Smtp-Source: APXvYqyP+v6vGTTlHv9Qdw43VGCo2FUbEF6jGoufQe40F4fVNT40nrb4i107uXoEZWHh7QenTueZ731y9rdvwyK5nqI= X-Received: by 2002:a67:f1ca:: with SMTP id v10mr7829250vsm.180.1581933252927; Mon, 17 Feb 2020 01:54:12 -0800 (PST) MIME-Version: 1.0 References: <1581925669-15294-1-git-send-email-agupta3@marvell.com> In-Reply-To: <1581925669-15294-1-git-send-email-agupta3@marvell.com> From: David Marchand Date: Mon, 17 Feb 2020 10:54:02 +0100 Message-ID: To: Amit Gupta Cc: Harman Kalra , dev , Bruce Richardson X-MC-Unique: 51UOptl0OjuM0EWviVUOTw-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH] net/octeontx: meson build fix if octeontx drivers are disabled 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 Mon, Feb 17, 2020 at 8:48 AM wrote: > > From: Amit Gupta > > Add a condition to check if octeontx drivers are disabled. > octeontx drivers are built only if dependent drivers i.e. > ethdev, mempool and common/octeontx are enabled. > > BugZilla ID # BUG 387 Interesting format, but we prefer consistency, you can see this in git hist= ory. Bugzilla ID: xxx This can be caught by running the devtools/check-git-log.sh script. > > Signed-off-by: Amit Gupta > --- > drivers/net/octeontx/base/meson.build | 32 ++++++++++++++++++++++++-----= --- > 1 file changed, 24 insertions(+), 8 deletions(-) > > diff --git a/drivers/net/octeontx/base/meson.build b/drivers/net/octeontx= /base/meson.build > index a06a2c8..50e7972 100644 > --- a/drivers/net/octeontx/base/meson.build > +++ b/drivers/net/octeontx/base/meson.build > @@ -9,17 +9,33 @@ sources =3D [ > > depends =3D ['ethdev', 'mempool_octeontx'] > static_objs =3D [] > -foreach d: depends > - static_objs +=3D [get_variable('static_rte_' + d)] > + > +disabled_drivers =3D get_option('disable_drivers').split(',') > + > +build =3D true > +foreach disable_path: disabled_drivers > + if (('net/octeontx' =3D=3D disable_path) or > + ('event/octeontx' =3D=3D disable_path) or > + ('common/octeontx' =3D=3D disable_path) or > + ('mempool/octeontx' =3D=3D disable_path)) > + build =3D false > + endif > endforeach I am no meson expert, but I'd say you can put a subdir_done() if your check is false and then you don't need to check the build variable later. Besides, you can most likely do this check at the top of this file alongside "depends". Cc: Bruce who commented on this bz. > > c_args =3D cflags > if allow_experimental_apis > - c_args +=3D '-DALLOW_EXPERIMENTAL_API' > + c_args +=3D '-DALLOW_EXPERIMENTAL_API' Unrelated change + whitespace damage after. > endif > -base_lib =3D static_library('octeontx_base', sources, > - c_args: c_args, > - dependencies: static_objs, > -) > > -base_objs =3D base_lib.extract_all_objects() > +if build > + foreach d: depends > + static_objs +=3D [get_variable('static_rte_' + d)] > + endforeach > + > + base_lib =3D static_library('octeontx_base', sources, > + c_args: c_args, > + dependencies: static_objs, > + ) > + > + base_objs =3D base_lib.extract_all_objects() > +endif > -- > 1.8.3.1 > -- David Marchand