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 A7BC1A0542; Fri, 7 Oct 2022 21:33:19 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 905DD40687; Fri, 7 Oct 2022 21:33:19 +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 8F85340DDC for ; Fri, 7 Oct 2022 21:33:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665171197; 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=z9dFvAbXKOpai6RBw/6tq1vLID12QshaMslBRs6GLdc=; b=d02mY7DAiOeEELrrfEaTlaIjJWWbDGkBUNtFy2/uDXrvIpeA8I4SpieXlIuOz66valwFko TN0E0WkYJSK+aVJyaYrmy1VCy5105HEQBhzClzUwf9kE5xMClyRDh4MDwoxrw6Oxs60pvs pGh4JjB9Z7fj4gWvkKb585a0Ii2z3qA= Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-403-MDq2QHWuOwuBC4AafCfirw-1; Fri, 07 Oct 2022 15:33:16 -0400 X-MC-Unique: MDq2QHWuOwuBC4AafCfirw-1 Received: by mail-pl1-f197.google.com with SMTP id m10-20020a170902db0a00b001789bd49db9so3895834plx.23 for ; Fri, 07 Oct 2022 12:33:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=z9dFvAbXKOpai6RBw/6tq1vLID12QshaMslBRs6GLdc=; b=eLe42sAQAomNCLJ391cwQed6eL68ee2OeKMf045lbgPmVxNvkI8Z4CDLkPT2h/2Eqc SdQ/uTg2+58uhhME6C8pvOvuae8QXch9/3WE+JZMeZpUin2vFzexnNFQQQn0pR/69hx9 6n1dfOEEOI6pnRfmjTw3Ex+oz4W8R0o15HFrBrjyD4DziF5wcM0KwgN/7Sh4m+odFtWo L32Zpw5W1b/bVswWgeRWs4MSoM89UlrfDghF3DHXSrKh9JfVGdOVUfin0z46H7nrv221 2PuMvYkVbnh9qrEV+dn/Beqzpd3M19zDnPyL8SA4Rhn8olUTAF45h7iQSZhOlMrQPOxj iQHg== X-Gm-Message-State: ACrzQf3s2jAYd6zsP188kiwpcD7SsxJUhSC+2l1gBwR6mH8MGOahVQpM /wNLsMG0/+iKVX9q2dd91xGMh6BotCrduQH6e1aRdOUg0PwlI2N7CqAwr4GYuRLVFl6e40vuxKI mpP3q2bFeYOLLtEbgKiM= X-Received: by 2002:a63:2a97:0:b0:457:23e9:586d with SMTP id q145-20020a632a97000000b0045723e9586dmr5878180pgq.190.1665171195099; Fri, 07 Oct 2022 12:33:15 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5JNSilGeoVd8KDc6njjYafd+moNbCcRbjLCcPplB7oiHfmzaSwHN58qxJXgmjNCS55TPAwNaxhk2bN2WR3x08= X-Received: by 2002:a63:2a97:0:b0:457:23e9:586d with SMTP id q145-20020a632a97000000b0045723e9586dmr5878164pgq.190.1665171194797; Fri, 07 Oct 2022 12:33:14 -0700 (PDT) MIME-Version: 1.0 References: <20221005143451.157613-1-bruce.richardson@intel.com> <20221007150134.1110983-1-bruce.richardson@intel.com> In-Reply-To: <20221007150134.1110983-1-bruce.richardson@intel.com> From: David Marchand Date: Fri, 7 Oct 2022 21:33:02 +0200 Message-ID: Subject: Re: [PATCH v2 1/3] kni: flag deprecated status at build time To: Bruce Richardson Cc: dev@dpdk.org 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 Fri, Oct 7, 2022 at 5:01 PM Bruce Richardson wrote: > > To ensure all users are aware of KNI's deprecated status at build time > we can take the following actions: > > 1. disable the library by default. It can be re-enabled by setting > disabled_libs to the empty string (or other string not including > 'kni') > > 2. add support for a list of deprecated libs to the lib/meson.build file > so the error message for KNI being disabled includes the fact that it > is a deprecated library. > > 3. for the dependent NIC driver, drivers/net/kni, modify its disabled > message to also reference the fact that KNI is disabled. > > NOTE: This is part of the deprecation process for KNI agreed by the DPDK > technical board.[1] > > [1] http://mails.dpdk.org/archives/dev/2022-June/243596.html > > Signed-off-by: Bruce Richardson I suppose you wanted to go as simple as possible but let me suggest something. If you think it is not worth, I am ok with the current patch and you can add: Reviewed-by: David Marchand The suggestion: By exposing the deprecated lib list to meson.build, we can make the deprecation warning as part of {drivers,lib}/meson.build. Then the other components depending on a deprecated library don't need to be updated. Like: diff --git a/drivers/meson.build b/drivers/meson.build index f6ba5ba4fb..f7ef22c9e6 100644 --- a/drivers/meson.build +++ b/drivers/meson.build @@ -133,6 +133,9 @@ foreach subpath:subdirs if not is_variable('shared_rte_' + d) build = false reason = 'missing internal dependency, "@0@"'.format(d) + if dpdk_libs_deprecated.contains(d) + reason += ' (deprecated lib)' + endif message('Disabling @1@ [@2@]: missing internal dependency "@0@"' .format(d, name, 'drivers/' + drv_path)) else diff --git a/drivers/net/kni/meson.build b/drivers/net/kni/meson.build index 6289aa6cc3..2acc989694 100644 --- a/drivers/net/kni/meson.build +++ b/drivers/net/kni/meson.build @@ -6,11 +6,6 @@ if is_windows reason = 'not supported on Windows' subdir_done() endif -if not dpdk_conf.has('RTE_LIB_KNI') - build = false - reason = 'needs deprecated lib, "kni"' - subdir_done() -endif deps += 'kni' sources = files('rte_eth_kni.c') diff --git a/lib/meson.build b/lib/meson.build index 264a1671df..a17a5a986a 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -85,7 +85,8 @@ optional_libs = [ 'vhost', ] -deprecated_libs = ['kni'] +dpdk_libs_deprecated += ['kni'] + disabled_libs = [] opt_disabled_libs = run_command(list_dir_globs, get_option('disable_libs'), check: true).stdout().split() @@ -134,11 +135,11 @@ foreach l:libraries if disabled_libs.contains(l) build = false reason = 'explicitly disabled via build config' - if deprecated_libs.contains(l) + if dpdk_libs_deprecated.contains(l) reason += ' (deprecated lib)' endif else - if deprecated_libs.contains(l) + if dpdk_libs_deprecated.contains(l) warning('Enabling deprecated library, "@0@"'.format(l)) endif subdir(l) @@ -156,6 +157,9 @@ foreach l:libraries if not is_variable('shared_rte_' + d) build = false reason = 'missing internal dependency, "@0@"'.format(d) + if dpdk_libs_deprecated.contains(d) + reason += ' (deprecated lib)' + endif message('Disabling @1@ [@2@]: missing internal dependency "@0@"' .format(d, name, 'lib/' + l)) else diff --git a/meson.build b/meson.build index 8b1b09ead5..8a2d64efef 100644 --- a/meson.build +++ b/meson.build @@ -42,6 +42,7 @@ dpdk_chkinc_headers = [] dpdk_driver_classes = [] dpdk_drivers = [] dpdk_extra_ldflags = [] +dpdk_libs_deprecated = [] dpdk_libs_disabled = [] dpdk_drvs_disabled = [] testpmd_drivers_sources = []