From patchwork Wed Oct 5 14:34:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 117384 X-Patchwork-Delegate: andrew.rybchenko@oktetlabs.ru Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3D992A0542; Wed, 5 Oct 2022 16:35:15 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EF6B940694; Wed, 5 Oct 2022 16:35:14 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 2CBC140143; Wed, 5 Oct 2022 16:35:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1664980512; x=1696516512; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=5bv2MQ/rbXd0CFFLuEKwuoa9enZduIKpK8u9EDdf4xA=; b=LspK+fQPXauuWJM//GI2Biq8SRMJMd/2mbdp4xLIiPKpXRdyKsDwMqpR YbkhyM1HTFY0p4waPMfBJ4FTDppXVjNIZJw2JSaGYFjZwII1DmRCZgdqC E7Z3qUGKAYue9ItQdRn1XI/FaafmIoHyRkb2hXvRnqtNESepEgrfYf9J3 ZwGiaDZbFp1b4kMGxMU9n+1I1QXHygE7WGWioOFxTFpC4GhwKIlY51U4f ZABAfW0Pc/E51L0j8RMD0Pu7JdfDm3mvjsDFoENEAErsiHNBzduaXyjaD u2Nv6nW9Zweb3sfJ7EFrRhT8kBtKyvWCK/fAbG6lHNzPZjnDwZ6IOaJMS A==; X-IronPort-AV: E=McAfee;i="6500,9779,10491"; a="290419703" X-IronPort-AV: E=Sophos;i="5.95,161,1661842800"; d="scan'208";a="290419703" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Oct 2022 07:34:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10491"; a="619480550" X-IronPort-AV: E=Sophos;i="5.95,161,1661842800"; d="scan'208";a="619480550" Received: from silpixa00401385.ir.intel.com ([10.237.214.34]) by orsmga007.jf.intel.com with ESMTP; 05 Oct 2022 07:34:56 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: techboard@dpdk.org, Bruce Richardson Subject: [PATCH 1/2] kni: flag deprecated status at build time Date: Wed, 5 Oct 2022 15:34:50 +0100 Message-Id: <20221005143451.157613-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 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 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 --- doc/guides/prog_guide/kernel_nic_interface.rst | 4 ++++ drivers/net/kni/meson.build | 5 +++++ lib/meson.build | 7 +++++++ meson_options.txt | 2 +- 4 files changed, 17 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/net/kni/meson.build b/drivers/net/kni/meson.build index 2acc989694..2deb2c4166 100644 --- a/drivers/net/kni/meson.build +++ b/drivers/net/kni/meson.build @@ -6,6 +6,11 @@ if is_windows reason = 'not supported on Windows' subdir_done() endif +if not dpdk_conf.has('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 c648f7d800..264a1671df 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -85,6 +85,7 @@ optional_libs = [ 'vhost', ] +deprecated_libs = ['kni'] disabled_libs = [] opt_disabled_libs = run_command(list_dir_globs, get_option('disable_libs'), check: true).stdout().split() @@ -133,7 +134,13 @@ foreach l:libraries if disabled_libs.contains(l) build = false reason = 'explicitly disabled via build config' + if deprecated_libs.contains(l) + reason += ' (deprecated lib)' + endif else + if deprecated_libs.contains(l) + warning('Enabling deprecated library, "@0@"'.format(l)) + endif subdir(l) endif if name != l 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.')