From patchwork Tue Nov 23 12:08:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ferruh Yigit X-Patchwork-Id: 104610 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 2775DA0C4C; Tue, 23 Nov 2021 13:08:49 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B448340040; Tue, 23 Nov 2021 13:08:48 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 94E8E4003C for ; Tue, 23 Nov 2021 13:08:46 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10176"; a="221889217" X-IronPort-AV: E=Sophos;i="5.87,257,1631602800"; d="scan'208";a="221889217" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Nov 2021 04:08:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,257,1631602800"; d="scan'208";a="538235772" Received: from silpixa00399752.ir.intel.com (HELO silpixa00399752.ger.corp.intel.com) ([10.237.222.27]) by orsmga001.jf.intel.com with ESMTP; 23 Nov 2021 04:08:43 -0800 From: Ferruh Yigit To: dev@dpdk.org, Keith Wiles Cc: Ferruh Yigit , Olivier Matz , David Marchand , Stephen Hemminger , Elad Nachman , Igor Ryzhov , Dan Gora Subject: [PATCH v2 1/2] doc: note KNI alternatives Date: Tue, 23 Nov 2021 12:08:38 +0000 Message-Id: <20211123120839.1740537-1-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210623173142.3803801-1-ferruh.yigit@intel.com> References: <20210623173142.3803801-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 Add more information on alternatives of KNI and the cons of KNI against these alternatives. Signed-off-by: Ferruh Yigit --- Cc: Olivier Matz Cc: David Marchand Cc: Stephen Hemminger Cc: Elad Nachman Cc: Igor Ryzhov Cc: Dan Gora --- doc/guides/nics/tap.rst | 2 ++ .../prog_guide/kernel_nic_interface.rst | 34 +++++++++++++++++-- 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/doc/guides/nics/tap.rst b/doc/guides/nics/tap.rst index 681010d9ed7d..2ba98893d564 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..70e92687d711 100644 --- a/doc/guides/prog_guide/kernel_nic_interface.rst +++ b/doc/guides/prog_guide/kernel_nic_interface.rst @@ -6,16 +6,44 @@ Kernel NIC Interface ==================== +.. Note:: + + :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 + has 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 provides an interface with the kernel network stack and allows management of +DPDK ports using standard Linux net tools such as ``ethtool``, ``ifconfig`` and +``tcpdump``. + +The main use case of KNI is to 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:`virtio_user_as_exceptional_path` + +#. :ref:`TunTap_PMD` as wrapper to `Linux tun/tap + `_ + +The benefits of using the 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 KNI are: + +* It is out-of-tree Linux kernel module and it can't be distributed as binary as + part of operating system vendor 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 net devices 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 Tue Nov 23 12:08:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ferruh Yigit X-Patchwork-Id: 104611 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 B74FFA0C4C; Tue, 23 Nov 2021 13:08:55 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A4F2740F35; Tue, 23 Nov 2021 13:08:55 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id DE09040688 for ; Tue, 23 Nov 2021 13:08:53 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10176"; a="235246217" X-IronPort-AV: E=Sophos;i="5.87,257,1631602800"; d="scan'208";a="235246217" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Nov 2021 04:08:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,257,1631602800"; d="scan'208";a="538235793" Received: from silpixa00399752.ir.intel.com (HELO silpixa00399752.ger.corp.intel.com) ([10.237.222.27]) by orsmga001.jf.intel.com with ESMTP; 23 Nov 2021 04:08:50 -0800 From: Ferruh Yigit To: dev@dpdk.org, Ray Kinsella Cc: Ferruh Yigit , Olivier Matz , David Marchand , Stephen Hemminger , Elad Nachman , Igor Ryzhov , Dan Gora Subject: [PATCH v2 2/2] doc: announce KNI deprecation Date: Tue, 23 Nov 2021 12:08:39 +0000 Message-Id: <20211123120839.1740537-2-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211123120839.1740537-1-ferruh.yigit@intel.com> References: <20210623173142.3803801-1-ferruh.yigit@intel.com> <20211123120839.1740537-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 --- Cc: Olivier Matz Cc: David Marchand Cc: 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 70e92687d711..276014fe28bb 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 6d087c64ef28..62fd991e4eb4 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