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 DC48EA0C41; Wed, 17 Nov 2021 12:27:33 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CB5DF411AE; Wed, 17 Nov 2021 12:27:33 +0100 (CET) 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 0CB0D41174 for ; Wed, 17 Nov 2021 12:27:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1637148451; 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=zZHRE6UyCfgDtEzsvF+WlVoDYnc+YdBZZOUuOIANWAo=; b=KVcQglPLgdxHwIMYp8fuctiBalj96rmBJfZtu8kj479gTzRhlKqbUP1eAyM1mUycNSP6SI G+B4o/FdQusXR9nxXranWhBORtXhNGf2xNSAnH+INDcOCPTAlCEuJkm6q3avI3ZNMHMlDU 5R9itxbV/TJLGNzy2ECzCAv611fK4bk= Received: from mail-lf1-f70.google.com (mail-lf1-f70.google.com [209.85.167.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-273-RWREBvq0MtSrF5W_jeQAMQ-1; Wed, 17 Nov 2021 06:27:30 -0500 X-MC-Unique: RWREBvq0MtSrF5W_jeQAMQ-1 Received: by mail-lf1-f70.google.com with SMTP id k5-20020a05651210c500b0040934a07fbdso1223744lfg.22 for ; Wed, 17 Nov 2021 03:27:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zZHRE6UyCfgDtEzsvF+WlVoDYnc+YdBZZOUuOIANWAo=; b=xR/w/Q90o0SOknNv9FMXalrJivwjlGLBRAKQYRKLMBOxTElc2sV6x0Gmr4b9MBf7Wc nfWljHOsPmAy6+IRmfeGCUz4kHDDkmhyVhntZNO/YBcG69CufEwNOrkQ4p+/QSw0HRQp uj5fWD44mCn1FpYg+hMQxUYus/EuWkQZRizX/ZMvYqqfNK1I5BhisexNeW1jrZtivTgt 3/CuSR29ywqEi9OLFDnNRkd+0oA9p1Es+SfpyFab8kJyOmD09+V28g/blp9n/7rU+nnV 0l1/50Y3hkvVGieaQa4jbI82VamqhjRlg2Lano+2epiNvYDkUxFiTUxeiMPDghLsx/RV mWZg== X-Gm-Message-State: AOAM532LrB1+g8jBb8Gb8GizzXvVx7WLZWFNVvmhQnIqF3y7YrOsGjaI bVSZaoCCTsroQTZpjan9CdPh9UwDzfL0VXqNqyBPWWZNCn1TkSXCXgyhAbHnPDfVsX5P0ZmnCTd tDbLriaLFkPXGpe8FtbA= X-Received: by 2002:a05:6512:aca:: with SMTP id n10mr14548337lfu.265.1637148448899; Wed, 17 Nov 2021 03:27:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJzVDpmJLkKXa3FWEtYDojsqcglHMPzWHzxxnFjYJf2M7xQylXz+V5+S/2sFEuVqeB+YoAiUGtxviPy7R3teTvY= X-Received: by 2002:a05:6512:aca:: with SMTP id n10mr14548312lfu.265.1637148448683; Wed, 17 Nov 2021 03:27:28 -0800 (PST) MIME-Version: 1.0 References: <20211110164814.5231-1-david.marchand@redhat.com> <20211110164814.5231-6-david.marchand@redhat.com> <4536860.m2YTRCI3sh@thomas> In-Reply-To: From: David Marchand Date: Wed, 17 Nov 2021 12:27:17 +0100 Message-ID: Subject: Re: [PATCH 5/5] build: select optional libraries To: Bruce Richardson Cc: Thomas Monjalon , dev , Luca Boccassi , Timothy Redaelli , Ilya Maximets , Jim Harris , mohammed@hawari.fr 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" 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 Wed, Nov 17, 2021 at 11:47 AM Bruce Richardson wrote: > > On Tue, Nov 16, 2021 at 06:25:28PM +0100, Thomas Monjalon wrote: > > 10/11/2021 18:34, Bruce Richardson: > > > On Wed, Nov 10, 2021 at 05:48:14PM +0100, David Marchand wrote: > > > > There is currently no way to know which libraries are optional. > > > > Introduce a enable_libs option (close to what we have for drivers) so > > > > that packagers or projects consuming DPDK can more easily select the > > > > optional libraries that matter to them and disable other optional > > > > libraries. > > > > > > > > Note: the enabled_libs variable is renamed for sake of consistency. > > > > > > > > Signed-off-by: David Marchand > > > > --- > > > This is the only patch of this set I would have some concerns about. I'm > > > just not sure that it makes sense to have this option for libraries > > > compared to drivers. > > > > > > Specifically: > > > * We have over 200 drivers in DPDK (rough count using find), of which 2 are > > > mandatory, and therefore specifying just 1 or 2 that you want can make > > > sense. > > > * On the other hand, we have 53 libraries, of which only 7 or so (after > > > this patchset) are optional. This means that use of the term > > > "enable_libs" is misleading - at least to me - in that it's only a very > > > small proportion of the libs which would be affected by that flag > > > (compared to 99% of the drivers) > > > > The options are described like this: > > > > option('disable_libs', type: 'string', value: '', description: > > 'Comma-separated list of libraries to explicitly disable. [NOTE: not all libs can be disabled]') > > +option('enable_libs', type: 'string', value: '', description: > > + 'Comma-separated list of libraries to explicitly enable.') > > > > I feel we should mention it is enabling optional libraries, > > and the default is to enable all. > > > > > * Also, while the number of mandatory drivers is unlikely to change much > > > (since there are only 2), it should be fairly safe to do builds using > > > "--enable-drivers". On the other hand, the list of libraries affected by > > > "--enable-libs" is likely to change, so short of each user naming each > > > and every lib they use (and each library those depend on), to the list, > > > it's quite possible that any --enable-libs use could lead to a broken > > > build in future if a library changes from mandatory to optional. > > > > In order to be safe, the user can list all required libs, > > including non-optional ones. > > > > Yes, they can, but that is the part I'm concerned about. It should not be > expected for users to know what all libraries should be needed and > dependencies between them. The list of mandatory libraries is quite long. > > > > Overall, I'm just concerned that this flag is premature, and would prefer > > > to keep it just to the disable option until we are confident that out > > > "optional library" list is relatively settled. > > > > I see it the opposite way: > > Someone who does not wish to deliver extra libs could use this option > > to list the required libs, so not-required libs will disappear from > > the build once they are declared optional in future releases. > > > > Yes, though as-above, I'm concerned about the difficulty of building up > such a list. However, if this option is only for "expert" and > distro-packaging use, then I suppose it's reasonable. Perhaps we should add > a warning to the doc line too, noting that it's only recommended for > advanced users. > Ok, we still need some discussion. I'll just respin for Thomas to merge patches that are ready. -- David Marchand