From: Ferruh Yigit <ferruh.yigit@amd.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: dev@dpdk.org, "Olivier Matz" <olivier.matz@6wind.com>,
"David Marchand" <david.marchand@redhat.com>,
"Stephen Hemminger" <stephen@networkplumber.org>,
"Elad Nachman" <eladv6@gmail.com>,
"Igor Ryzhov" <iryzhov@nfware.com>, "Dan Gora" <dg@adax.com>,
"Morten Brørup" <mb@smartsharesystems.com>
Subject: [PATCH v6] doc: note KNI alternatives
Date: Thu, 24 Nov 2022 17:15:24 +0000 [thread overview]
Message-ID: <20221124171524.3372345-1-ferruh.yigit@amd.com> (raw)
In-Reply-To: <20221124114041.3169291-1-ferruh.yigit@amd.com>
Add more information on alternatives of KNI and the disadvantages of KNI
against these alternatives.
Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
Cc: Olivier Matz <olivier.matz@6wind.com>
Cc: David Marchand <david.marchand@redhat.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>
Cc: Elad Nachman <eladv6@gmail.com>
Cc: Igor Ryzhov <iryzhov@nfware.com>
Cc: Dan Gora <dg@adax.com>
Cc: Morten Brørup <mb@smartsharesystems.com>
v6:
* s/ifconfig/iproute2/
* reword distributing binary module disadvantage
v5:
* Rebased
* Dedicated kernel core added as disadvantage
---
.../prog_guide/kernel_nic_interface.rst | 35 ++++++++++++++++---
1 file changed, 30 insertions(+), 5 deletions(-)
diff --git a/doc/guides/prog_guide/kernel_nic_interface.rst b/doc/guides/prog_guide/kernel_nic_interface.rst
index 6a564f61cad8..fe088f0c4508 100644
--- a/doc/guides/prog_guide/kernel_nic_interface.rst
+++ b/doc/guides/prog_guide/kernel_nic_interface.rst
@@ -11,8 +11,9 @@ Kernel NIC Interface
KNI is deprecated and will be removed in future.
See :doc:`../rel_notes/deprecation`.
- For an alternative to KNI, that does not require any out-of-tree Linux kernel modules,
- or a custom library, see :ref:`virtio_user_as_exception_path`.
+ :ref:`virtio_user_as_exception_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.
.. note::
@@ -21,14 +22,38 @@ Kernel NIC Interface
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``, ``iproute2`` 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_exception_path`
+
+#. :doc:`../nics/tap` as wrapper to `Linux tun/tap
+ <https://www.kernel.org/doc/Documentation/networking/tuntap.txt>`_
+
+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 disadvantages of the KNI are:
+
+* It is out-of-tree Linux kernel module which makes updating and distributing the
+ driver more difficult. Most users end up building the KNI driver from source
+ which requires the packages and tools to build kernel modules.
+
+* 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.
+
+* Requires dedicated kernel cores.
-* 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`.
--
2.25.1
next prev parent reply other threads:[~2022-11-24 17:15 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-23 17:31 [dpdk-dev] [PATCH] doc: note KNI alternatives and deprecation plan Ferruh Yigit
2021-06-23 18:33 ` Stephen Hemminger
2021-06-24 8:19 ` Ferruh Yigit
2021-07-30 12:48 ` Olivier Matz
2021-11-23 10:21 ` Ferruh Yigit
2021-08-20 12:58 ` David Marchand
2021-11-23 10:42 ` Ferruh Yigit
2021-11-23 12:08 ` [PATCH v2 1/2] doc: note KNI alternatives Ferruh Yigit
2021-11-23 12:08 ` [PATCH v2 2/2] doc: announce KNI deprecation Ferruh Yigit
2021-11-24 14:00 ` Thomas Monjalon
2021-11-24 13:58 ` [PATCH v2 1/2] doc: note KNI alternatives Thomas Monjalon
2021-11-24 14:19 ` Ferruh Yigit
2021-11-24 17:16 ` [PATCH v3 " Ferruh Yigit
2021-11-24 17:16 ` [PATCH v3 2/2] doc: announce KNI deprecation Ferruh Yigit
2022-07-11 14:47 ` Jerin Jacob
2022-07-13 10:01 ` Thomas Monjalon
2022-07-13 11:01 ` Bruce Richardson
2022-07-13 16:10 ` [PATCH v4] " Thomas Monjalon
2022-07-13 19:51 ` Thomas Monjalon
2022-07-15 15:33 ` Thomas Monjalon
2022-07-14 9:20 ` Bruce Richardson
2022-07-14 10:07 ` Thomas Monjalon
2022-07-14 14:50 ` Ferruh Yigit
2022-07-14 15:03 ` Ferruh Yigit
2022-07-15 15:32 ` Thomas Monjalon
2022-07-14 9:30 ` David Marchand
2021-12-01 16:31 ` [PATCH v3 1/2] doc: note KNI alternatives Morten Brørup
2022-11-24 10:31 ` Ferruh Yigit
2022-11-24 11:40 ` [PATCH v5] " Ferruh Yigit
2022-11-24 16:55 ` Stephen Hemminger
2022-11-24 17:08 ` Ferruh Yigit
2022-11-24 17:15 ` Ferruh Yigit [this message]
2022-11-26 21:11 ` [PATCH v6] " Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221124171524.3372345-1-ferruh.yigit@amd.com \
--to=ferruh.yigit@amd.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=dg@adax.com \
--cc=eladv6@gmail.com \
--cc=iryzhov@nfware.com \
--cc=mb@smartsharesystems.com \
--cc=olivier.matz@6wind.com \
--cc=stephen@networkplumber.org \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).