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 76A23A0544; Mon, 10 Oct 2022 12:44:58 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5BBD04021E; Mon, 10 Oct 2022 12:44:58 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id F280A40146 for ; Mon, 10 Oct 2022 12:44:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665398697; x=1696934697; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=hEwMyt/4p7Ouk04y4jybmM7FfPtrICs5Bdh4OYa/MVc=; b=FTv2xcfDC7hRYCOqns0qAQZ0lEYGv9LLU/Wao4+fTbEeWaP6FdPg75OW Y49bdGe6gDGxa4CAQYA75hZ6hrtMMwEasg156f/5OYMwHnaULsouiQ9YZ 3x6woOZMdb5qJdqAvi8fCsF90hUfE5qJ/UMOgzxkor7nVsY3Ny1JJOs3y 4EXF/pzhd1TreiIogwjh64nrwE3LI+zyLNSJzScXnwiBB4QfX7PocE9Oq Jmh02PkyI5LeIOFmzmlT6P+U+4QqxH728x+/sXm/Z168hyhvSVPp9RYt/ Cf7S6v5g5wD0tU86MhkPuWjoTwjZIRmNJtWW6mpyg1ryY/VUVmBudPDLp A==; X-IronPort-AV: E=McAfee;i="6500,9779,10495"; a="283921414" X-IronPort-AV: E=Sophos;i="5.95,173,1661842800"; d="scan'208";a="283921414" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Oct 2022 03:44:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10495"; a="954871935" X-IronPort-AV: E=Sophos;i="5.95,173,1661842800"; d="scan'208";a="954871935" Received: from silpixa00401385.ir.intel.com ([10.237.214.34]) by fmsmga005.fm.intel.com with ESMTP; 10 Oct 2022 03:44:54 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: david.marchand@redhat.com, Bruce Richardson Subject: [PATCH v3 1/3] kni: flag deprecated status at build time Date: Mon, 10 Oct 2022 11:44:46 +0100 Message-Id: <20221010104448.350578-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221005143451.157613-1-bruce.richardson@intel.com> References: <20221005143451.157613-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 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 the driver build code to similarly flag the deprecation in the reason why the driver is not being built.. 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 Signed-off-by: David Marchand --- V3: Incorporate code from David M. to generalise the driver dependency handling of deprecated libs. V2: correct dpdk_conf lookup key to RTE_LIB_KNI --- doc/guides/prog_guide/kernel_nic_interface.rst | 4 ++++ drivers/meson.build | 3 +++ lib/meson.build | 11 +++++++++++ meson.build | 1 + meson_options.txt | 2 +- 5 files changed, 20 insertions(+), 1 deletion(-) diff --git a/doc/guides/prog_guide/kernel_nic_interface.rst b/doc/guides/prog_guide/kernel_nic_interface.rst index 03b5bca958..6a564f61ca 100644 --- a/doc/guides/prog_guide/kernel_nic_interface.rst +++ b/doc/guides/prog_guide/kernel_nic_interface.rst @@ -14,6 +14,10 @@ Kernel NIC Interface For an alternative to KNI, that does not require any out-of-tree Linux kernel modules, or a custom library, see :ref:`virtio_user_as_exception_path`. +.. note:: + + KNI is disabled by default in the DPDK build. + To re-enable the library, remove 'kni' from the "disable_libs" meson option when configuring a build. The DPDK Kernel NIC Interface (KNI) allows userspace applications access to the Linux* control plane. 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/lib/meson.build b/lib/meson.build index c648f7d800..a17a5a986a 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -85,6 +85,8 @@ optional_libs = [ 'vhost', ] +dpdk_libs_deprecated += ['kni'] + disabled_libs = [] opt_disabled_libs = run_command(list_dir_globs, get_option('disable_libs'), check: true).stdout().split() @@ -133,7 +135,13 @@ foreach l:libraries if disabled_libs.contains(l) build = false reason = 'explicitly disabled via build config' + if dpdk_libs_deprecated.contains(l) + reason += ' (deprecated lib)' + endif else + if dpdk_libs_deprecated.contains(l) + warning('Enabling deprecated library, "@0@"'.format(l)) + endif subdir(l) endif if name != l @@ -149,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 cf3343a547..1d35a255c3 100644 --- a/meson.build +++ b/meson.build @@ -40,6 +40,7 @@ dpdk_chkinc_headers = [] dpdk_driver_classes = [] dpdk_drivers = [] dpdk_extra_ldflags = [] +dpdk_libs_deprecated = [] dpdk_libs_disabled = [] dpdk_drvs_disabled = [] testpmd_drivers_sources = [] diff --git a/meson_options.txt b/meson_options.txt index 8640f599ae..39af78787c 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -8,7 +8,7 @@ option('developer_mode', type: 'feature', description: 'turn on additional build checks relevant for DPDK developers') option('disable_drivers', type: 'string', value: '', description: 'Comma-separated list of drivers to explicitly disable.') -option('disable_libs', type: 'string', value: '', description: +option('disable_libs', type: 'string', value: 'kni', description: 'Comma-separated list of libraries to explicitly disable. [NOTE: not all libs can be disabled]') option('drivers_install_subdir', type: 'string', value: 'dpdk/pmds-', description: 'Subdirectory of libdir where to install PMDs. Defaults to using a versioned subdirectory.') -- 2.34.1