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 A904C42FB0; Tue, 1 Aug 2023 10:36:49 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 40F2D40A7D; Tue, 1 Aug 2023 10:36:49 +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 6D281400D5 for ; Tue, 1 Aug 2023 10:36:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1690879007; 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=/A4P6/bRZkFrdMsTfKDzdKHRUP6q0g4ONCb5Tqv6AoA=; b=LfyoY+so2kWu4OEkkbHNXPWNbx25uIbhLuakbuli86T4MbVzcRRwB+bfeH7R3uQs2OHfcT 5LHLhYmGlFtZWJWapseyIQV1pkG5vJc9SUEYA/cAH5/kENamgd48D7zFfwoPM5P0MgbI9U VRo0Exh+n06AkSfDRBBP4MaiaJ8zjyg= Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-222-0bvWcUIqOMWpRVBqw8k7-w-1; Tue, 01 Aug 2023 04:36:44 -0400 X-MC-Unique: 0bvWcUIqOMWpRVBqw8k7-w-1 Received: by mail-pj1-f69.google.com with SMTP id 98e67ed59e1d1-268113acd37so4662004a91.0 for ; Tue, 01 Aug 2023 01:36:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690879003; x=1691483803; 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=/A4P6/bRZkFrdMsTfKDzdKHRUP6q0g4ONCb5Tqv6AoA=; b=h9PDLsST9hGKR0fXPew2mXpRQdPpt8yRyZHp/uqVtU0zpBUBp8b3mf02dq4JL3ltfE Ghed/JXOGGGIvLujQC+zWaaVSbC4Q2cpNDkQDqjkseV3qySi9DrQ7aiuMH9GMPGedYHh hObH5+fK2foY9T8VGPtW+sAkSNGVDO8Ew25FJ9cMPKuiD/a04YeGEfletm8Txbf8Qhve hTKfTbqx5pzZ8iYZiVPwN0PB14Qkn2E85czBy0IJ2lNQEtX8giOZohSp5Hk99fI38LNN uiTJnftvs3UBf1ENfohJPc9NADlU9dpzrxqPXwjPmhm0P3U5JoHRcFHUi13vlnkneCAg 2cWg== X-Gm-Message-State: ABy/qLbgf3rkTYXDm1WH2FCVTIRewlmSzRAqcj2CGhZdgJ8aLg1Oj2xt O8+50XJPGO0B03Ybx0m1k051dtPTY9K6CFGYx4YPNr87dsdxToBBLIe/ZGwVqDktcNORIbZAE/p 820tNT5P5uj+2IKzsy30= X-Received: by 2002:a17:90a:a085:b0:268:535f:7c15 with SMTP id r5-20020a17090aa08500b00268535f7c15mr14548383pjp.0.1690879003323; Tue, 01 Aug 2023 01:36:43 -0700 (PDT) X-Google-Smtp-Source: APBJJlEaQ0KjCCTYVofbsOIM739QW8m74zuVznqFmlwwHckncJNH+keBK63dVBN32Ay6lC4fZcelsb3CiS/dLiaQSSw= X-Received: by 2002:a17:90a:a085:b0:268:535f:7c15 with SMTP id r5-20020a17090aa08500b00268535f7c15mr14548369pjp.0.1690879003024; Tue, 01 Aug 2023 01:36:43 -0700 (PDT) MIME-Version: 1.0 References: <20230622134840.3225975-1-bruce.richardson@intel.com> <20230623150708.2203918-1-bruce.richardson@intel.com> <20230623150708.2203918-3-bruce.richardson@intel.com> In-Reply-To: From: David Marchand Date: Tue, 1 Aug 2023 10:36:30 +0200 Message-ID: Subject: Re: [PATCH v4 2/9] event/dlb2: skip configuration if no eventdev lib To: Bruce Richardson Cc: dev@dpdk.org, Timothy McDaniel 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 Hello Bruce, On Tue, Jul 18, 2023 at 11:10=E2=80=AFAM Bruce Richardson wrote: > > On Thu, Jun 29, 2023 at 11:39:53AM +0200, David Marchand wrote: > > On Wed, Jun 28, 2023 at 12:19=E2=80=AFPM David Marchand > > wrote: > > > > > > On Fri, Jun 23, 2023 at 5:07=E2=80=AFPM Bruce Richardson > > > wrote: > > > > > > > > While the build system will skip building most libs and drivers whe= n a > > > > dependency is missing for a component, for DLB2 driver, the > > > > "static_rte_eventdev" object is referenced inside the meson.build f= ile > > > > itself, which will cause crashes if it doesn't exist i.e. if eventd= ev is > > > > disabled. Prevent this issue by skipping processing the file if no > > > > eventdev. [The build system will still report missing dependency, a= s the > > > > dependency is set by default for all eventdev drivers] > > > > > > > > Signed-off-by: Bruce Richardson > > > > > > Could we evaluate the class "std_deps" before jumping to each driver > > > meson.build? > > > > Hum, with my suggestion, we lose the opportunity for drivers to > > rewrite completely their "deps". > > I doubt we have cases where it really matters, but if this revealed to > > be necessary, such driver may be directly referenced in > > drivers/meson.build like we do for common/cnxk & friends. > > > > To illustrate the idea, I pushed your series along patches of mine > > (target is v23.11) in my github repo. > > https://github.com/david-marchand/dpdk/commit/enable_libs~8 > > > I don't think we should need to worry too much about the case of a driver > needing to rewrite deps. The standard deps should really just be the > minimal deps for a class. > > However, for the implementation of that check, I'm not sure I like the > approach of checking std_deps in a loop for each driver. Firstly, the log= ic > inside the per-driver block is already pretty complicated, but secondly, = I > think we can skip that loop entirely if the standard deps for a class are > not met. I think instead it would be better to process std_deps value onc= e > immediately after the "subdir(class)" line, and if not all deps are > present, just loop through all the driver directories for that class > immediately and mark them as unbuildable, before just moving on to the ne= xt > class. Skipping this loop makes the change smaller and the logic in drivers/meson.build easier to understand. We lose the exhaustive summary for disabled content (before, every disabled driver was logged with the associated reason), but we can still log the reason why a class is disabled. Your suggestion looks good to me, let me send a patch. --=20 David Marchand