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 1E218A0547; Fri, 30 Jul 2021 14:48:17 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 935FD40042; Fri, 30 Jul 2021 14:48:16 +0200 (CEST) Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by mails.dpdk.org (Postfix) with ESMTP id 095F94003F for ; Fri, 30 Jul 2021 14:48:15 +0200 (CEST) Received: by mail-wr1-f43.google.com with SMTP id b13so316314wrs.3 for ; Fri, 30 Jul 2021 05:48:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=hrmirCZ02Qr3jB+cg586yG/jxr86Os8AMKmlQMLi0Hs=; b=UT7dT1ApzI6zPJDIzfZg0x5I6OqnTLj5J/gOoZ+NTEgkhfuqs3tfIxVpKkUAZuGcEL FByD6bNPI6Igd64tWNhWTFfucNJ/gvWk1dQBfNktr3UHHPfv18B5ZBduBPy6hd+Glrre W2dZcA0dlCk1ox08rSh70HMh0DTcB1z93wIdDCVe4mrkIB81DFkjT6C2eMVdMi+L6Hqx dKlIxZ8RLMSqQjsxoSfoxCyM1Uu7XMzKXJCPCDiidIW4Ib14T95+cONP0uWcULOF+Tdb ME3CSqI3BnMvAXSaGKZpIxnoMcWXorjzhKMKWuTQbm9fNJJJkzlToyhzTmSi+L+58L+Q z88w== 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:references :mime-version:content-disposition:in-reply-to; bh=hrmirCZ02Qr3jB+cg586yG/jxr86Os8AMKmlQMLi0Hs=; b=cBBe8futdSijY/5ZWd/1J+iZ061w5w6OKf2/qw++xktmKHCFINu2GiIqeZQ8+VvkEX It/dqOEsgDYzIXZeTSo1z5KEGIyjfibFhzzYn1IsRwm1FfbTvoA8hu25U0UrZ4DdXkuD bNjNP2mUwSxG7vRwYMRdDnQ5239nrCDtqwI3For3ESRXH2ZXoeejn/3fC7NhGh4belPE gLkoUq5Pv+AZIVHfDDbbYcODVbERD6i0BTqSGQMARWtPwvAiQ1N/VmFsuC9dd2YHST0R dN3ATiRL5KowEwX/gYKfRpVJOMPNpgpX4eWPx3MTaOLs5PJVAaM2xmk4wU/MAtd/exau KbmA== X-Gm-Message-State: AOAM530w/6kJZaFX7TIwgfXpMvtFzDEpCsF8n3sE+QhYrNN3nxXEAmzf wUOu5E8L+2Fz9xQiokVrkBqApg== X-Google-Smtp-Source: ABdhPJwpXozLKqyYnFeC+65iVo1rTSGmMehsqZ9OHk5a7OPusi0QFsOhUqhCm/rce1s136uUYVmDDg== X-Received: by 2002:adf:9d88:: with SMTP id p8mr2957694wre.409.1627649294655; Fri, 30 Jul 2021 05:48:14 -0700 (PDT) Received: from 6wind.com ([2a01:e0a:5ac:6460:c065:401d:87eb:9b25]) by smtp.gmail.com with ESMTPSA id b6sm1776122wmj.34.2021.07.30.05.48.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Jul 2021 05:48:14 -0700 (PDT) Date: Fri, 30 Jul 2021 14:48:13 +0200 From: Olivier Matz To: Ferruh Yigit Cc: dev@dpdk.org, Keith Wiles , Stephen Hemminger , Thomas Monjalon Message-ID: References: <20210623173142.3803801-1-ferruh.yigit@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210623173142.3803801-1-ferruh.yigit@intel.com> 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" Hi Ferruh, Few minor comments below. On Wed, Jun 23, 2021 at 06:31:42PM +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 `_ removed -> moved? Or "removed from main and moved to" > + 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` Shouldn't virtio_user be the first item? > + > +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 OSV -> OVS > + 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`. > > -- > 2.31.1 >