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 00C6AA0C42; Wed, 23 Jun 2021 20:33:36 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7FF6940141; Wed, 23 Jun 2021 20:33:36 +0200 (CEST) Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) by mails.dpdk.org (Postfix) with ESMTP id 0B9FE4003F for ; Wed, 23 Jun 2021 20:33:35 +0200 (CEST) Received: by mail-pj1-f46.google.com with SMTP id h23so2003533pjv.2 for ; Wed, 23 Jun 2021 11:33:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=q9gFpyqScYd8U4TTtiwE1Eh1w64JQ6rYs6XRK/xLX2E=; b=JMbhXJ3MYmFj8MjV3ndvZfsJ60dLBb6ahmJWZaZehp8QL32blkLkl2NP07KKJwo8BT MOTNm4odCR3oZRC1hsxga/DDBNr2ry4yAUier9HS21N2vkJ98OrWhA/BfiRldvUyTfZy jMs2JkcEtbJa1f8SFlcEJM4PtVQCGPPn8WOCaLxvnFDTCYx1KtGpr1yINA/LDbKPKDjR +TaUKWUAx5Ii2lyhJ5kDrGjP9qIBglQmixFkraTQinpl3DOtl/kmeyT3+48INEAmdj53 0+Yx8uqk0ZobNdJ8wPvnVccVp5WAzXdVopcfu4q7p/kbrC+5VQGyeCcM0LUNBKNzdY6b /07A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=q9gFpyqScYd8U4TTtiwE1Eh1w64JQ6rYs6XRK/xLX2E=; b=IEdeDGEIquh32DqA3HAFYki2DTBDfx1YxQz4l2Qs2oxlLqdrQt7rk97L3Ty6/RaVP6 9/9uh31guub91o4Opyn3KXIfNfwwA0N8RuNO10XwAY6sPxQDBP0u3XLZSoWdOkdFJSLa hjCl/D5or+JqfmKs7ZFE6WdiS3Jiq5sTzIWbUranyzi/Vm8AR2MUb4aARV8G4sqhanDx a5y9TLGRmUD8+HV0T8ok1HOIm52D6J84kX0jIiCGPshGVAVhn05PETUThE8XbpiOPtsn mKHntp1btQ9SjZQpo9n+hxDOdUeqx1ASqkDOExEwyyp/s5mxoyeQnANDCi3NtWHx2rz/ Va3Q== X-Gm-Message-State: AOAM530W4QBFXXaRTzR4zeU0yLqSZcSKt/F/rCVYoqtzwnLRm84fI024 bmZhJfTe9ky9QawVY2EYghWyfA== X-Google-Smtp-Source: ABdhPJzcxFyxX79HMCFBDYBhLBVNhuoQyVhKTZ6a41jwYutRv1p6iXZDsH0zueBCq/FxIO+7oYIu4w== X-Received: by 2002:a17:902:d705:b029:11d:9bb6:a3da with SMTP id w5-20020a170902d705b029011d9bb6a3damr717170ply.33.1624473214184; Wed, 23 Jun 2021 11:33:34 -0700 (PDT) Received: from hermes.local (76-14-218-44.or.wavecable.com. [76.14.218.44]) by smtp.gmail.com with ESMTPSA id z16sm541891pff.9.2021.06.23.11.33.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Jun 2021 11:33:33 -0700 (PDT) Date: Wed, 23 Jun 2021 11:33:25 -0700 From: Stephen Hemminger To: Ferruh Yigit Cc: dev@dpdk.org, Keith Wiles , Thomas Monjalon Message-ID: <20210623113325.7687788f@hermes.local> In-Reply-To: <20210623173142.3803801-1-ferruh.yigit@intel.com> References: <20210623173142.3803801-1-ferruh.yigit@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [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" On Wed, 23 Jun 2021 18:31:42 +0100 Ferruh Yigit wrote: > 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`. > You should also link to virtio user as exception path. In my testing virtio is as fast as KNI and uses less CPU.