From patchwork Wed Jun 23 17:31:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ferruh Yigit X-Patchwork-Id: 94770 X-Patchwork-Delegate: thomas@monjalon.net 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 813CBA0C42; Wed, 23 Jun 2021 19:32:02 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ECC8C40141; Wed, 23 Jun 2021 19:32:01 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 2CD314003F for ; Wed, 23 Jun 2021 19:32:00 +0200 (CEST) IronPort-SDR: nsrsP0A4KH6LnAb5w92rGq0IpclSbWftOl9VJHKPTRvqxTLfCULF81H06w/CIkWzc9gBjMe3vz MmnRql8UhJYA== X-IronPort-AV: E=McAfee;i="6200,9189,10024"; a="204305820" X-IronPort-AV: E=Sophos;i="5.83,294,1616482800"; d="scan'208";a="204305820" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jun 2021 10:31:58 -0700 IronPort-SDR: JEFhq5Ah93V6uiuCazx6G9DEJ84y6d/sCTsLpD4ApcI2v9YHTrq+dTyMNW4YHZVTRRIfgHdZEz 1BGTwwOteLZQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,294,1616482800"; d="scan'208";a="557048643" Received: from silpixa00399752.ir.intel.com (HELO silpixa00399752.ger.corp.intel.com) ([10.237.222.27]) by fmsmga001.fm.intel.com with ESMTP; 23 Jun 2021 10:31:56 -0700 From: Ferruh Yigit To: dev@dpdk.org, Keith Wiles Cc: Ferruh Yigit , Stephen Hemminger , Thomas Monjalon Date: Wed, 23 Jun 2021 18:31:42 +0100 Message-Id: <20210623173142.3803801-1-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH] doc: note KNI alternatives and deprecation plan 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 Sender: "dev" Add a note that KNI kernel module will be moved to dpdk-kmods git repo and there is a long term plan to deprecate it. Also add some more details on the alternatives to KNI and cons of the KNI against these alternatives. Signed-off-by: Ferruh Yigit --- doc/guides/nics/tap.rst | 2 + .../prog_guide/kernel_nic_interface.rst | 38 +++++++++++++++++-- 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/doc/guides/nics/tap.rst b/doc/guides/nics/tap.rst index 3ce696b605d1..07315fe32422 100644 --- a/doc/guides/nics/tap.rst +++ b/doc/guides/nics/tap.rst @@ -1,6 +1,8 @@ .. SPDX-License-Identifier: BSD-3-Clause Copyright(c) 2016 Intel Corporation. +.. _TunTap_PMD: + Tun|Tap Poll Mode Driver ======================== diff --git a/doc/guides/prog_guide/kernel_nic_interface.rst b/doc/guides/prog_guide/kernel_nic_interface.rst index 1ce03ec1a374..29f8c92fd9d6 100644 --- a/doc/guides/prog_guide/kernel_nic_interface.rst +++ b/doc/guides/prog_guide/kernel_nic_interface.rst @@ -6,16 +6,48 @@ Kernel NIC Interface ==================== +.. Note:: + + KNI kernel module will be removed from main git repository to `dpdk-kmods `_ + repository by the `DPDK technical board decision `_. + Also there is a `long term plan `_ to deprecate the KNI. + + :ref:`virtio_user_as_exceptional_path` alternative is preferred way for + interfacing with Linux network stack as it is being in-kernel solution and + similar performance expectations. + The DPDK Kernel NIC Interface (KNI) allows userspace applications access to the Linux* control plane. -The benefits of using the DPDK KNI are: +KNI allows an interface with the kernel network stack and allows management of +DPDK ports using standard Linux net tools such as ``ethtool``, ``ifconfig`` and +``tcpdump``. + +Main use case of KNI is get/receive exception packets from/to Linux network +stack while main datapath IO is done bypassing the networking stack. + +There are other alternatives to KNI, all are available in the upstream Linux: + +#. :ref:`TunTap_PMD` as wrapper to `Linux tun/tap + `_ + +#. :ref:`virtio_user_as_exceptional_path` + +The benefits of using the DPDK KNI against alternatives are: * Faster than existing Linux TUN/TAP interfaces (by eliminating system calls and copy_to_user()/copy_from_user() operations. -* Allows management of DPDK ports using standard Linux net tools such as ethtool, ifconfig and tcpdump. +The cons of the DPDK KNI are: + +* It is out-of-tree Linux kernel module and it can't be distributed as binary as + part of OSV DPDK packages. This makes it harder to consume, although it is + always possible to compile it from the source code. + +* As it shares memory between userspace and kernelspace, and kernel part + directly uses input provided by userspace, it is not safe. This makes hard to + upstream the module. -* Allows an interface with the kernel network stack. +* Only a subset of control commands are supported by KNI. The components of an application using the DPDK Kernel NIC Interface are shown in :numref:`figure_kernel_nic_intf`. From patchwork Wed Nov 24 17:16:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ferruh Yigit X-Patchwork-Id: 104678 X-Patchwork-Delegate: thomas@monjalon.net 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 169EFA0C52; Wed, 24 Nov 2021 18:18:45 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CCE8640696; Wed, 24 Nov 2021 18:18:44 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 5C8424003C for ; Wed, 24 Nov 2021 18:18:43 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10178"; a="235570374" X-IronPort-AV: E=Sophos;i="5.87,260,1631602800"; d="scan'208";a="235570374" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Nov 2021 09:16:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,260,1631602800"; d="scan'208";a="497751768" Received: from silpixa00399752.ir.intel.com (HELO silpixa00399752.ger.corp.intel.com) ([10.237.222.27]) by orsmga007.jf.intel.com with ESMTP; 24 Nov 2021 09:16:23 -0800 From: Ferruh Yigit To: Ray Kinsella Cc: Ferruh Yigit , dev@dpdk.org, Olivier Matz Olivier Matz , David Marchand David Marchand , Stephen Hemminger Stephen Hemminger , Elad Nachman , Igor Ryzhov , Dan Gora Subject: [PATCH v3 2/2] doc: announce KNI deprecation Date: Wed, 24 Nov 2021 17:16:09 +0000 Message-Id: <20211124171609.3101896-2-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211124171609.3101896-1-ferruh.yigit@intel.com> References: <20210623173142.3803801-1-ferruh.yigit@intel.com> <20211124171609.3101896-1-ferruh.yigit@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 Announce the KNI kernel module move to out of dpdk repo and announce long term plan to deprecate the KNI. Signed-off-by: Ferruh Yigit Acked-by: Jerin Jacob --- Cc: Olivier Matz Olivier Matz Cc: David Marchand David Marchand Cc: Stephen Hemminger Stephen Hemminger Cc: Elad Nachman Cc: Igor Ryzhov Cc: Dan Gora Dates are not discussed before, the patch aims to trigger a discussion for the dates. --- doc/guides/prog_guide/kernel_nic_interface.rst | 2 ++ doc/guides/rel_notes/deprecation.rst | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/doc/guides/prog_guide/kernel_nic_interface.rst b/doc/guides/prog_guide/kernel_nic_interface.rst index f5a8b7c0782c..d1c5ccd0851d 100644 --- a/doc/guides/prog_guide/kernel_nic_interface.rst +++ b/doc/guides/prog_guide/kernel_nic_interface.rst @@ -7,6 +7,8 @@ Kernel NIC Interface ==================== .. Note:: + KNI kernel module will be moved from main git repository to `dpdk-kmods `_ repository. + There is a long term plan to deprecate the KNI. See :doc:`../rel_notes/deprecation` :ref:`virtio_user_as_exceptional_path` alternative is the preferred way for interfacing with the Linux network stack as it is an in-kernel solution and diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 2262b8de6093..f20852504319 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -48,6 +48,12 @@ Deprecation Notices in the header will not be considered as ABI anymore. This change is inspired by the RFC https://patchwork.dpdk.org/project/dpdk/list/?series=17176. +* kni: KNI kernel module will be moved to `dpdk-kmods `_ + repository by the `DPDK technical board decision + `_, on v22.11. +* kni: will be depreciated, will remove all kni lib, kernel module and example code + on v23.11. + * 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 used by iterators, and arrays holding these values are sized with this