From patchwork Fri Oct 7 15:01:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 117569 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 6BC95A00C3; Fri, 7 Oct 2022 17:01:44 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2FC0540DDC; Fri, 7 Oct 2022 17:01:44 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 37BE840A80 for ; Fri, 7 Oct 2022 17:01:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665154902; x=1696690902; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=LRxjL1EVj1ck631CzY252Gn6wtnwUgIzno+dPNWIpzY=; b=VYV8VUs3/IuIfRRPwz2lBlP14u+OVLZCP+cYuz5Ot4zBmv+3rwVKvUT/ qBhhSBaD97Z8abV9BHSvCHDQ/ll59Yp8SwiDcoyaoB1uvEIHzl4OSWM6V VYsVKkmVhOhmvpeX/5ArxaHlYf1Axzqo8MPbDeA1rL/xIYiBDZCevPe/9 APgtCya4UFJtr+uqpq/WBD7wOI7jlAqn2YD/nEqraGZCq14ttmZFHHXAi AvA6hQAPHAlA7ERyD0wkpuNoU0KO2eQByNHeVmZ51Ooh0cG5TwB14UMQD 2uBsxr2OnbmfQXP9sNBwLMn6cR2jbWytiq3lepiIapZBFJPFGO538Vumi A==; X-IronPort-AV: E=McAfee;i="6500,9779,10493"; a="303734845" X-IronPort-AV: E=Sophos;i="5.95,166,1661842800"; d="scan'208";a="303734845" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2022 08:01:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10493"; a="750580497" X-IronPort-AV: E=Sophos;i="5.95,166,1661842800"; d="scan'208";a="750580497" Received: from silpixa00401385.ir.intel.com ([10.237.214.34]) by orsmga004.jf.intel.com with ESMTP; 07 Oct 2022 08:01:39 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: david.marchand@redhat.com, Bruce Richardson Subject: [PATCH v2 1/3] kni: flag deprecated status at build time Date: Fri, 7 Oct 2022 16:01:32 +0100 Message-Id: <20221007150134.1110983-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 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 Reviewed-by: David Marchand --- V2: correct dpdk_conf lookup key to RTE_LIB_KNI --- 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(-) -- 2.34.1 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..6289aa6cc3 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('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 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.') From patchwork Fri Oct 7 15:01:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 117570 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 C6FEBA00C3; Fri, 7 Oct 2022 17:01:53 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7568442B9D; Fri, 7 Oct 2022 17:01:46 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id D13784284D for ; Fri, 7 Oct 2022 17:01:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665154904; x=1696690904; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dK44sXRezeWAW6f/WxzpBtpup/8PRx71ZFXyfNoTmio=; b=PFrIxAVbKBqfSZghBZTmuoSRG0aFhp4H6RzXQjT5FKo1207BHMDF0Gun GUYep2OKNoGPAne3oT5ANlRR+s0ppMIj/g+751sr8LWwQOIx3dDsPfbVW xAAypqvt8VFaC0Giq/d8nohKHNTsmCF1G4q0SP7/C+VfkoPYQI3olYi5T evv/kIHuzNBIVctSjWCZgdEFaiS+RDiDwL8Q+hRTE+oMl2i2V/Guyq55Y JEKRZWi7Tga/wC9zQSDMXiF3eD7RaTZBGBsnOfy1u1MHGMInqN85kRolN F0TTaPA5SIZF0/hGTBXa+bkNPfUAKpX+1lgVykZvH/ALvr2s+lBizDxBp w==; X-IronPort-AV: E=McAfee;i="6500,9779,10493"; a="303734861" X-IronPort-AV: E=Sophos;i="5.95,166,1661842800"; d="scan'208";a="303734861" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2022 08:01:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10493"; a="750580556" X-IronPort-AV: E=Sophos;i="5.95,166,1661842800"; d="scan'208";a="750580556" Received: from silpixa00401385.ir.intel.com ([10.237.214.34]) by orsmga004.jf.intel.com with ESMTP; 07 Oct 2022 08:01:43 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: david.marchand@redhat.com, Bruce Richardson Subject: [PATCH v2 2/3] kni: add deprecation warning at runtime Date: Fri, 7 Oct 2022 16:01:33 +0100 Message-Id: <20221007150134.1110983-2-bruce.richardson@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221007150134.1110983-1-bruce.richardson@intel.com> References: <20221005143451.157613-1-bruce.richardson@intel.com> <20221007150134.1110983-1-bruce.richardson@intel.com> 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 When KNI is being used at runtime, output a warning message about its deprecated status. 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 Reviewed-by: David Marchand --- doc/guides/rel_notes/deprecation.rst | 6 ++---- lib/kni/rte_kni.c | 2 ++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 7c74725968..41e81be6ae 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -37,10 +37,8 @@ Deprecation Notices applications - other technologies such as virtio-user are recommended instead. Following the DPDK technical board `decision `_ - and `refinement `_: - - * Some deprecation warnings will be added in DPDK 22.11. - * The KNI kernel module, library and PMD will be removed from the DPDK 23.11. + and `refinement `_, + the KNI kernel module, library and PMD will be removed from the DPDK 23.11 release. * lib: will fix extending some enum/define breaking the ABI. There are multiple samples in DPDK that enum/define terminated with a ``.*MAX.*`` value which is diff --git a/lib/kni/rte_kni.c b/lib/kni/rte_kni.c index 7971c56bb4..eb7c10ff19 100644 --- a/lib/kni/rte_kni.c +++ b/lib/kni/rte_kni.c @@ -96,6 +96,8 @@ static volatile int kni_fd = -1; int rte_kni_init(unsigned int max_kni_ifaces __rte_unused) { + RTE_LOG(WARNING, KNI, "WARNING: KNI is deprecated and will be removed in DPDK 23.11\n"); + #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) if (rte_eal_iova_mode() != RTE_IOVA_PA) { RTE_LOG(ERR, KNI, "KNI requires IOVA as PA\n"); From patchwork Fri Oct 7 15:01:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 117571 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 DDE88A00C3; Fri, 7 Oct 2022 17:01:59 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 535E142B82; Fri, 7 Oct 2022 17:01:50 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id CA73242B82 for ; Fri, 7 Oct 2022 17:01:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665154907; x=1696690907; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Op/xZngFD18BewsnuFfnKjJFehCfZT5idrNKoqJMmkc=; b=gtijVinNj/SlRTZww+StvLkCEHSGp9UUdkVZbao0WQjsNLRhjHQ1jgbs quRA+8913IdlrkNLE5aBRdzvpYJx18AiMQ9+rPbTTlL1rZbSkFNRArCAR fbVTPZx42IrZZ15rlc7J7WJuam6mQYRwx1ruXtuwqKO373eNSr4aCx1qJ kH/EL3j1nKRUz+N/Irdpl23FjcM/b5+cbn0P5Fz9XJbaJkFKe6ZvRJrzr SxwZkvZq+L3LbfAQ7qL5Ew9XVetaUo8A7X6y5+QGV8+7UWQY+F5/MxAFI XpuzQqSerD91+1LyU71QMGAl5Rx9l2o1/WHRhVrQ9KDlGiWh2Pj8kEgaM Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10493"; a="303734880" X-IronPort-AV: E=Sophos;i="5.95,166,1661842800"; d="scan'208";a="303734880" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2022 08:01:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10493"; a="750580595" X-IronPort-AV: E=Sophos;i="5.95,166,1661842800"; d="scan'208";a="750580595" Received: from silpixa00401385.ir.intel.com ([10.237.214.34]) by orsmga004.jf.intel.com with ESMTP; 07 Oct 2022 08:01:46 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: david.marchand@redhat.com, Bruce Richardson Subject: [PATCH v2 3/3] devtools: enable kni library for test builds Date: Fri, 7 Oct 2022 16:01:34 +0100 Message-Id: <20221007150134.1110983-3-bruce.richardson@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221007150134.1110983-1-bruce.richardson@intel.com> References: <20221005143451.157613-1-bruce.richardson@intel.com> <20221007150134.1110983-1-bruce.richardson@intel.com> 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 While KNI (or any other deprecated library) may be disabled by default, for build testing we need it enabled. Therefore explicitly set "disable_libs" build parameter to empty for any DPDK build where the value is not being explicitly set by the script. Signed-off-by: Bruce Richardson --- devtools/test-meson-builds.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh index e20a1c1df3..3a308bc9af 100755 --- a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-builds.sh @@ -109,6 +109,11 @@ config () # return fi options= + # deprecated libs may be disabled by default, so for complete builds ensure + # no libs are disabled + if ! echo $* | grep -q -- 'disable_libs' ; then + options="$options -Ddisable_libs=" + fi if echo $* | grep -qw -- '--default-library=shared' ; then options="$options -Dexamples=all" else