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 1D2A542FB1; Tue, 1 Aug 2023 12:21:05 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 08DC540F16; Tue, 1 Aug 2023 12:21:05 +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 50C7F40A89 for ; Tue, 1 Aug 2023 12:21:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1690885262; 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=FJy0LXRB0I8uDRUQEGOjpA1uXbQJlMjQlZtk2xz2THM=; b=X3Qq4lX7P+U0mBCU3ontp4FxHKRK2qUha9aLYQL9uet/v/VOClkZuuTPTxLYTSQvI+WcR/ 3Lpk1/m/yvrxSfFv7xHjaYCu2CP5nN4X6OfUVKeB5YDH3fSvAJe5aG338Lfn2EWnMfhyVi kMAt8opsB/OaM3XdcTZqzIgaK1aXTXc= Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-327-lZaBdbOzMd2R0iO7TCv3Ag-1; Tue, 01 Aug 2023 06:21:01 -0400 X-MC-Unique: lZaBdbOzMd2R0iO7TCv3Ag-1 Received: by mail-pg1-f197.google.com with SMTP id 41be03b00d2f7-55c04f5827eso3865093a12.1 for ; Tue, 01 Aug 2023 03:21:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690885260; x=1691490060; 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=FJy0LXRB0I8uDRUQEGOjpA1uXbQJlMjQlZtk2xz2THM=; b=gzmkzx9G1rjYmDnyCju7nwcDTXv1OUfQl6Zn41cEdmqPLJtK3JG7tb6w4f7Qaruw3h 8NZOWSaImeQyV7i8vjoumbz2Qqz9hBi3b1X8KthAPVjOv8oMCvMo+3na2/jvlDHQGIW+ RgaxuG13wm/d6IUaC/ZU0UcmgAe9VCJkxxvqFwdZJ7DayOr4V1Lst1FzMmXXOyVvRiiY iNs5+84pw2sPNd3i+qTof69oItNtDDq6xjLWKVSeG4QYqmQ7UJcleb8BY3x+7qr4ZvXY VVoqLKPVzov3J40rGq/KjGYw7OrGa4xZ+i/S7UXAsck/odzd7wSaB5FNoViEvbO1t6kh a56w== X-Gm-Message-State: ABy/qLY5rLSQgq+uAxVWDYrsnT1txbyqaMED6re0KFqQ1flEe35kPLOG 5RAHFts33eUnwYCXtDsmw4i4yfCVmeOdNF0iZmSSGcjZy/RNp2sSkioiVwPm21H8vQKOWRAzcJG fiwSEek2TdTRViVbvZnuAWLTzdiXUcA== X-Received: by 2002:a17:90b:33cf:b0:268:2930:ca49 with SMTP id lk15-20020a17090b33cf00b002682930ca49mr10147297pjb.44.1690885260600; Tue, 01 Aug 2023 03:21:00 -0700 (PDT) X-Google-Smtp-Source: APBJJlHeFtX4PyJcD5b0Kqv6HSEwFBnaK/uilC4222XRKMYIHNMKFj+JFT1cEE2i/pef8al4ka5+6yW8FAIwqAHY9BM= X-Received: by 2002:a17:90b:33cf:b0:268:2930:ca49 with SMTP id lk15-20020a17090b33cf00b002682930ca49mr10147288pjb.44.1690885260293; Tue, 01 Aug 2023 03:21:00 -0700 (PDT) MIME-Version: 1.0 References: <20230801085253.2447095-1-david.marchand@redhat.com> In-Reply-To: From: David Marchand Date: Tue, 1 Aug 2023 12:20:47 +0200 Message-ID: Subject: Re: [PATCH] build: check drivers class dependencies early To: Bruce Richardson Cc: dev@dpdk.org 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 Tue, Aug 1, 2023 at 11:25=E2=80=AFAM Bruce Richardson wrote: > > On Tue, Aug 01, 2023 at 10:52:53AM +0200, David Marchand wrote: > > Drivers implementing a class of devices (for example, drivers/event) > > depend on the associated abstraction library (lib/eventdev). > > This dependency is expressed in the top level meson.build for this clas= s > > (drivers/event/meson.build). > > > > As we are making more libraries optional, custom constructs referencing > > the class dependencies in some drivers meson.build (event/dlb2) may bre= ak. > > > > It would be possible to add more checks in those drivers meson.build bu= t > > it is more straightforward to not even consider a driver meson.build wh= en > > the class dependencies are not met. > > > > Signed-off-by: David Marchand > > --- > > drivers/meson.build | 11 +++++++++++ > > 1 file changed, 11 insertions(+) > > > > diff --git a/drivers/meson.build b/drivers/meson.build > > index 74ae8cb96b..c375352e77 100644 > > --- a/drivers/meson.build > > +++ b/drivers/meson.build > > @@ -70,6 +70,17 @@ foreach subpath:subdirs > > else > > class =3D subpath > > subdir(class) > > + skip_class =3D false > > + foreach d:std_deps > > + if not is_variable('shared_rte_' + d) > > + skip_class =3D true > > + message('Disabling all @1@ drivers: missing internal d= ependency "@0@"' > > + .format(d, class)) > > + endif > > + endforeach > > + if skip_class > > + continue > > + endif > > endif > > > > # save class name on first occurrence > > I like this approach. However, we do need something in the summary at the > end of the build too. Either: > > * Single message stating all drivers of a given class are skipped > * (as now), message for each driver stating that it has been disabled > > The former is nice as it gives us a shorter summary. The latter is nice > because it's consistent with what we have now. Authors choice, which to = go > for! :-) I like the shorter summary. WDYT of: diff --git a/drivers/meson.build b/drivers/meson.build index c375352e77..02268918e4 100644 --- a/drivers/meson.build +++ b/drivers/meson.build @@ -74,11 +74,18 @@ foreach subpath:subdirs foreach d:std_deps if not is_variable('shared_rte_' + d) skip_class =3D true - message('Disabling all @1@ drivers: missing internal dependency "@0@"' + reason =3D 'missing internal dependency, "@0@"'.format(d) + if dpdk_libs_deprecated.contains(d) + reason +=3D ' (deprecated lib)' + endif + message('Disabling @1@/* drivers: missing internal dependency "@0@"' .format(d, class)) endif endforeach if skip_class + drv_path =3D join_paths(class, '*') + dpdk_drvs_disabled +=3D drv_path + set_variable(drv_path.underscorify() + '_disable_reason', reas= on) continue endif endif This gives the following output (testing on top of your series extending optional libs and a fix on the new reasm perf test). https://github.com/david-marchand/dpdk/actions/runs/5725429526/job/15513923= 381#step:19:346 ... =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Content Skipped =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ... drivers: ... mempool/dpaa2: not in enabled drivers build config mempool/octeontx: not in enabled drivers build config mempool/stack: not in enabled drivers build config dma/*: missing internal dependency, "dmadev" net/af_packet: not in enabled drivers build config net/af_xdp: not in enabled drivers build config net/ark: not in enabled drivers build config ... --=20 David Marchand