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 C8851A0C41; Wed, 1 Dec 2021 17:31:24 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5BAC94067B; Wed, 1 Dec 2021 17:31:24 +0100 (CET) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id 630F540140 for ; Wed, 1 Dec 2021 17:31:22 +0100 (CET) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: [PATCH v3 1/2] doc: note KNI alternatives Date: Wed, 1 Dec 2021 17:31:14 +0100 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35D86D2D@smartserver.smartshare.dk> In-Reply-To: <20211124171609.3101896-1-ferruh.yigit@intel.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH v3 1/2] doc: note KNI alternatives Thread-Index: AdfhV7TpWUIbZTGARn+hT3CMxd21KAFd6ADA References: <20210623173142.3803801-1-ferruh.yigit@intel.com> <20211124171609.3101896-1-ferruh.yigit@intel.com> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Ferruh Yigit" Cc: , "Olivier Matz Olivier Matz" , "David Marchand David Marchand" , "Stephen Hemminger Stephen Hemminger" , "Elad Nachman" , "Igor Ryzhov" , "Dan Gora" 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 > From: Ferruh Yigit [mailto:ferruh.yigit@intel.com] > Sent: Wednesday, 24 November 2021 18.16 >=20 > Add more information on alternatives of KNI and the cons of KNI = against > these alternatives. >=20 > Signed-off-by: Ferruh Yigit > --- > Cc: Olivier Matz Olivier Matz > Cc: David Marchand David Marchand > Cc: Stephen Hemminger Stephen Hemminger > Cc: Elad Nachman > Cc: Igor Ryzhov > Cc: Dan Gora >=20 > v3: > * reference tap document directly instead of adding label to it. > --- > .../prog_guide/kernel_nic_interface.rst | 34 = +++++++++++++++++-- > 1 file changed, 31 insertions(+), 3 deletions(-) >=20 > diff --git a/doc/guides/prog_guide/kernel_nic_interface.rst > b/doc/guides/prog_guide/kernel_nic_interface.rst > index 1ce03ec1a374..f5a8b7c0782c 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 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >=20 > +.. 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. >=20 > -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` > + > +#. :doc:`../nics/tap` as wrapper to `Linux tun/tap > + `_ > + > +The benefits of using the KNI against alternatives are: >=20 > * Faster than existing Linux TUN/TAP interfaces > (by eliminating system calls and copy_to_user()/copy_from_user() > operations. >=20 > -* Allows management of DPDK ports using standard Linux net tools > such as ethtool, ifconfig and tcpdump. > +The cons of the KNI are: Consider if "disadvantages" is more appropriate than "cons". (I'm not a = native English speaker.) > + > +* 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. >=20 > -* Allows an interface with the kernel network stack. > +* Only a subset of net devices control commands are supported by KNI. If it is still relevant, add something along the lines of: * Requires dedicated kernel cores. >=20 > The components of an application using the DPDK Kernel NIC Interface > are shown in :numref:`figure_kernel_nic_intf`. >=20 > -- > 2.31.1 >=20 Could you perhaps also promote the virtio-user documentation by moving = it from the HowTo Guides to the Programmer's Guide? -Morten