Skip to contentSkip to conversation

doc: note KNI alternatives and deprecation plan

PATCH In review Ferruh Yigit 10 participants 33 messages Jun 23, 2021 – Nov 26, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 doc: note KNI alternatives and deprecation plan

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.

---
 doc/guides/nics/tap.rst                       |  2 +
 .../prog_guide/kernel_nic_interface.rst       | 38 +++++++++++++++++--
 2 files changed, 37 insertions(+), 3 deletions(-)
doc/guides/nics/tap.rst +2 -0
index 3ce696b605d1..07315fe32422 100644
@@ -1,6 +1,8 @@
 ..  SPDX-License-Identifier: BSD-3-Clause
     Copyright(c) 2016 Intel Corporation.
 
+.. _TunTap_PMD:
+
 Tun|Tap Poll Mode Driver
 ========================
 
doc/guides/prog_guide/kernel_nic_interface.rst +35 -3
index 1ce03ec1a374..29f8c92fd9d6 100644
@@ -6,16 +6,48 @@
 Kernel NIC Interface
 ====================
 
+.. Note::
+
+   KNI kernel module will be removed from main git repository to `dpdk-kmods <https://git.dpdk.org/dpdk-kmods/>`_
+   repository by the `DPDK technical board decision <https://mails.dpdk.org/archives/dev/2021-January/197077.html>`_.
+   Also there is a `long term plan <https://mails.dpdk.org/archives/dev/2021-May/209026.html>`_ 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
+   <https://www.kernel.org/doc/Documentation/networking/tuntap.txt>`_
+
+#. :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`.
 
Signature · 1 line
2.31.1
#1 lore raw
Quoted 71 lines · On Wed, 23 Jun 2021 18:31:42 +0100 Ferruh Yigit <[email protected]> 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.

---
 doc/guides/nics/tap.rst                       |  2 +
 .../prog_guide/kernel_nic_interface.rst       | 38 +++++++++++++++++--
 2 files changed, 37 insertions(+), 3 deletions(-)
doc/guides/nics/tap.rst +2 -0
index 3ce696b605d1..07315fe32422 100644
@@ -1,6 +1,8 @@
 ..  SPDX-License-Identifier: BSD-3-Clause
     Copyright(c) 2016 Intel Corporation.
 
+.. _TunTap_PMD:
+
 Tun|Tap Poll Mode Driver
 ========================
 
doc/guides/prog_guide/kernel_nic_interface.rst +30 -2
index 1ce03ec1a374..29f8c92fd9d6 100644
@@ -6,16 +6,48 @@
 Kernel NIC Interface
 ====================
 
+.. Note::
+
+   KNI kernel module will be removed from main git repository to `dpdk-kmods <https://git.dpdk.org/dpdk-kmods/>`_
+   repository by the `DPDK technical board decision <https://mails.dpdk.org/archives/dev/2021-January/197077.html>`_.
+   Also there is a `long term plan <https://mails.dpdk.org/archives/dev/2021-May/209026.html>`_ 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
+   <https://www.kernel.org/doc/Documentation/networking/tuntap.txt>`_
+
+#. :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.

doc/guides/prog_guide/kernel_nic_interface.rst line 53

Quoted 10 lines
doc/guides/prog_guide/kernel_nic_interface.rst +5 -1
+
+* 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.

#2 lore raw
Quoted 79 lines · Stephen Hemminger
Quoted 76 lines · On Wed, 23 Jun 2021 18:31:42 +0100 Ferruh Yigit <[email protected]> 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.

---
 doc/guides/nics/tap.rst                       |  2 +
 .../prog_guide/kernel_nic_interface.rst       | 38 +++++++++++++++++--
 2 files changed, 37 insertions(+), 3 deletions(-)
doc/guides/nics/tap.rst +2 -0
index 3ce696b605d1..07315fe32422 100644
@@ -1,6 +1,8 @@
 ..  SPDX-License-Identifier: BSD-3-Clause
     Copyright(c) 2016 Intel Corporation.
 
+.. _TunTap_PMD:
+
 Tun|Tap Poll Mode Driver
 ========================
 
doc/guides/prog_guide/kernel_nic_interface.rst +34 -2
index 1ce03ec1a374..29f8c92fd9d6 100644
@@ -6,16 +6,48 @@
 Kernel NIC Interface
 ====================
 
+.. Note::
+
+   KNI kernel module will be removed from main git repository to `dpdk-kmods <https://git.dpdk.org/dpdk-kmods/>`_
+   repository by the `DPDK technical board decision <https://mails.dpdk.org/archives/dev/2021-January/197077.html>`_.
+   Also there is a `long term plan <https://mails.dpdk.org/archives/dev/2021-May/209026.html>`_ 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
+   <https://www.kernel.org/doc/Documentation/networking/tuntap.txt>`_
+
+#. :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.
 
Quoted 8 lines

doc/guides/prog_guide/kernel_nic_interface.rst line 53

Quoted 5 lines
doc/guides/prog_guide/kernel_nic_interface.rst +1 -1
-*   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.

Patch mentions from virtio-user alternative, and in the notes it even documents it as preferred way.

#3 lore raw
In reply to Ferruh Yigit

Hi Ferruh,

Few minor comments below.

Quoted 30 lines · Ferruh Yigit

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.

---
 doc/guides/nics/tap.rst                       |  2 +
 .../prog_guide/kernel_nic_interface.rst       | 38 +++++++++++++++++--
 2 files changed, 37 insertions(+), 3 deletions(-)
doc/guides/nics/tap.rst +2 -0
index 3ce696b605d1..07315fe32422 100644
@@ -1,6 +1,8 @@
 ..  SPDX-License-Identifier: BSD-3-Clause
     Copyright(c) 2016 Intel Corporation.
 
+.. _TunTap_PMD:
+
 Tun|Tap Poll Mode Driver
 ========================
 
doc/guides/prog_guide/kernel_nic_interface.rst +0 -0
index 1ce03ec1a374..29f8c92fd9d6 100644

doc/guides/prog_guide/kernel_nic_interface.rst line 11

Quoted 6 lines
doc/guides/prog_guide/kernel_nic_interface.rst +3 -0
@@ -6,16 +6,48 @@
 Kernel NIC Interface
 ====================
 
+.. Note::
+
+   KNI kernel module will be removed from main git repository to `dpdk-kmods <https://git.dpdk.org/dpdk-kmods/>`_

removed -> moved?

Or "removed from main and moved to"

Quoted 13 lines
doc/guides/prog_guide/kernel_nic_interface.rst +10 -1
+   repository by the `DPDK technical board decision <https://mails.dpdk.org/archives/dev/2021-January/197077.html>`_.
+   Also there is a `long term plan <https://mails.dpdk.org/archives/dev/2021-May/209026.html>`_ 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``.

doc/guides/prog_guide/kernel_nic_interface.rst line 33

Quoted 10 lines
doc/guides/prog_guide/kernel_nic_interface.rst +10 -0
+
+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
+   <https://www.kernel.org/doc/Documentation/networking/tuntap.txt>`_
+
+#. :ref:`virtio_user_as_exceptional_path`

Shouldn't virtio_user be the first item?

doc/guides/prog_guide/kernel_nic_interface.rst line 43

Quoted 11 lines
doc/guides/prog_guide/kernel_nic_interface.rst +6 -1
+
+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

Quoted 14 lines
doc/guides/prog_guide/kernel_nic_interface.rst +6 -1
+  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`.
 
Signature · 1 line
2.31.1
#4 lore raw
Quoted 38 lines · Olivier Matz

Hi Ferruh,

Few minor comments below.

Quoted 33 lines · Ferruh Yigit

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.

---
  doc/guides/nics/tap.rst                       |  2 +
  .../prog_guide/kernel_nic_interface.rst       | 38 +++++++++++++++++--
  2 files changed, 37 insertions(+), 3 deletions(-)
doc/guides/nics/tap.rst +2 -0
index 3ce696b605d1..07315fe32422 100644
@@ -1,6 +1,8 @@
  ..  SPDX-License-Identifier: BSD-3-Clause
      Copyright(c) 2016 Intel Corporation.
 
+.. _TunTap_PMD:
+
  Tun|Tap Poll Mode Driver
  ========================
 
doc/guides/prog_guide/kernel_nic_interface.rst +0 -0
index 1ce03ec1a374..29f8c92fd9d6 100644
@@ -6,16 +6,48 @@
  Kernel NIC Interface
  ====================
 
Quoted 6 lines

doc/guides/prog_guide/kernel_nic_interface.rst line 11

Quoted 3 lines
doc/guides/prog_guide/kernel_nic_interface.rst +3 -0
+.. Note::
+
+   KNI kernel module will be removed from main git repository to `dpdk-kmods <https://git.dpdk.org/dpdk-kmods/>`_

removed -> moved?

ack

Quoted 11 lines

Or "removed from main and moved to"

Quoted 9 lines
doc/guides/prog_guide/kernel_nic_interface.rst +7 -0
+   repository by the `DPDK technical board decision <https://mails.dpdk.org/archives/dev/2021-January/197077.html>`_.
+   Also there is a `long term plan <https://mails.dpdk.org/archives/dev/2021-May/209026.html>`_ 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.
 
Quoted 17 lines
Quoted 4 lines
doc/guides/prog_guide/kernel_nic_interface.rst +3 -1
-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``.

doc/guides/prog_guide/kernel_nic_interface.rst line 33

Quoted 10 lines
doc/guides/prog_guide/kernel_nic_interface.rst +10 -0
+
+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
+   <https://www.kernel.org/doc/Documentation/networking/tuntap.txt>`_
+
+#. :ref:`virtio_user_as_exceptional_path`

Shouldn't virtio_user be the first item?

ack

Quoted 6 lines
Quoted 6 lines
doc/guides/prog_guide/kernel_nic_interface.rst +2 -0
+
+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.
 
Quoted 8 lines

doc/guides/prog_guide/kernel_nic_interface.rst line 43

Quoted 5 lines
doc/guides/prog_guide/kernel_nic_interface.rst +4 -1
-*   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

I mean 'Operating System Vendor', I will use long version to prevent confusion.

Quoted 14 lines
Quoted 14 lines
doc/guides/prog_guide/kernel_nic_interface.rst +6 -1
+  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`.
 
Signature · 1 line
2.31.1
#5 lore raw
In reply to Ferruh Yigit
Quoted 6 lines · Ferruh Yigit

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.

Some suggestions on wording below, feel free to ignore if this sounds like French ;-).

Quoted 25 lines
---
 doc/guides/nics/tap.rst                       |  2 +
 .../prog_guide/kernel_nic_interface.rst       | 38 +++++++++++++++++--
 2 files changed, 37 insertions(+), 3 deletions(-)
doc/guides/nics/tap.rst +2 -0
index 3ce696b605d1..07315fe32422 100644
@@ -1,6 +1,8 @@
 ..  SPDX-License-Identifier: BSD-3-Clause
     Copyright(c) 2016 Intel Corporation.
 
+.. _TunTap_PMD:
+
 Tun|Tap Poll Mode Driver
 ========================
 
doc/guides/prog_guide/kernel_nic_interface.rst +0 -0
index 1ce03ec1a374..29f8c92fd9d6 100644

doc/guides/prog_guide/kernel_nic_interface.rst line 12

Quoted 7 lines
doc/guides/prog_guide/kernel_nic_interface.rst +3 -0
@@ -6,16 +6,48 @@
 Kernel NIC Interface
 ====================
 
+.. Note::
+
 
+   KNI kernel module will be removed from main git repository to `dpdk-kmods <https://git.dpdk.org/dpdk-kmods/>`_

The* KNI kernel module will be moved* (Olivier comment) to ...

doc/guides/prog_guide/kernel_nic_interface.rst line 12

Quoted 1 line
doc/guides/prog_guide/kernel_nic_interface.rst +1 -0
+   repository by the `DPDK technical board decision <https://mails.dpdk.org/archives/dev/2021-January/197077.html>`_.

repository following* the ..._.

I'd move this first part in doc/guides/rel_notes/deprecation.rst and/or release notes.
Then, reword this as:

doc/guides/prog_guide/kernel_nic_interface.rst line 13

Quoted 1 line
doc/guides/prog_guide/kernel_nic_interface.rst +1 -0
+   Also there is a `long term plan <https://mails.dpdk.org/archives/dev/2021-May/209026.html>`_ to deprecate the KNI.

The long term plan..._ is* to deprecate KNI, see <XXX link to deprecation notice/release notes>.

doc/guides/prog_guide/kernel_nic_interface.rst line 16

Quoted 2 lines
doc/guides/prog_guide/kernel_nic_interface.rst +2 -0
+
+   :ref:`virtio_user_as_exceptional_path` alternative is preferred way for

is one/a* preferred way

doc/guides/prog_guide/kernel_nic_interface.rst line 16

Quoted 1 line
doc/guides/prog_guide/kernel_nic_interface.rst +1 -0
+   interfacing with Linux network stack as it is being in-kernel solution and

interfacing with the* Linux network stack as it is a* in-kernel and

doc/guides/prog_guide/kernel_nic_interface.rst line 17

Quoted 1 line
doc/guides/prog_guide/kernel_nic_interface.rst +1 -0
+   similar performance expectations.

has* similar performance expectations.

doc/guides/prog_guide/kernel_nic_interface.rst line 21

Quoted 5 lines
doc/guides/prog_guide/kernel_nic_interface.rst +2 -1
+
 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

KNI provides* an interface ...

doc/guides/prog_guide/kernel_nic_interface.rst line 25

Quoted 4 lines
doc/guides/prog_guide/kernel_nic_interface.rst +4 -0
+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

The* main use case of KNI is to* ...

doc/guides/prog_guide/kernel_nic_interface.rst line 34

Quoted 9 lines
doc/guides/prog_guide/kernel_nic_interface.rst +9 -0
+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
+   <https://www.kernel.org/doc/Documentation/networking/tuntap.txt>`_
+
+#. :ref:`virtio_user_as_exceptional_path`
+

+1 to Olivier comment, for making virtio-user first.

doc/guides/prog_guide/kernel_nic_interface.rst line 40

Quoted 7 lines
doc/guides/prog_guide/kernel_nic_interface.rst +2 -1
+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:

Not sure why we need an extra DPDK, KNI alone is enough.

doc/guides/prog_guide/kernel_nic_interface.rst line 43

Quoted 3 lines
doc/guides/prog_guide/kernel_nic_interface.rst +3 -0
+
+* 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 as in OS vendors, right? ok for me.

doc/guides/prog_guide/kernel_nic_interface.rst line 50

Quoted 8 lines
doc/guides/prog_guide/kernel_nic_interface.rst +6 -1
+  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.

of net devices control commands*

Quoted 6 lines
doc/guides/prog_guide/kernel_nic_interface.rst +0 -1
 The components of an application using the DPDK Kernel NIC Interface are shown in :numref:`figure_kernel_nic_intf`.
 
--

2.31.1

Signature · 1 line
David Marchand
#6 lore raw
Quoted 43 lines · David Marchand
Quoted 6 lines · Ferruh Yigit

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.

Some suggestions on wording below, feel free to ignore if this sounds like French ;-).

Quoted 30 lines
---
  doc/guides/nics/tap.rst                       |  2 +
  .../prog_guide/kernel_nic_interface.rst       | 38 +++++++++++++++++--
  2 files changed, 37 insertions(+), 3 deletions(-)
doc/guides/nics/tap.rst +2 -0
index 3ce696b605d1..07315fe32422 100644
@@ -1,6 +1,8 @@
  ..  SPDX-License-Identifier: BSD-3-Clause
      Copyright(c) 2016 Intel Corporation.
 
+.. _TunTap_PMD:
+
  Tun|Tap Poll Mode Driver
  ========================
 
doc/guides/prog_guide/kernel_nic_interface.rst +2 -0
index 1ce03ec1a374..29f8c92fd9d6 100644
@@ -6,16 +6,48 @@
  Kernel NIC Interface
  ====================
 
+.. Note::
+
Quoted 7 lines

doc/guides/prog_guide/kernel_nic_interface.rst line 11

Quoted 1 line
doc/guides/prog_guide/kernel_nic_interface.rst +1 -0
+   KNI kernel module will be removed from main git repository to `dpdk-kmods <https://git.dpdk.org/dpdk-kmods/>`_

The* KNI kernel module will be moved* (Olivier comment) to ...

doc/guides/prog_guide/kernel_nic_interface.rst line 12

Quoted 1 line
doc/guides/prog_guide/kernel_nic_interface.rst +1 -0
+   repository by the `DPDK technical board decision <https://mails.dpdk.org/archives/dev/2021-January/197077.html>`_.

repository following* the ..._.

I'd move this first part in doc/guides/rel_notes/deprecation.rst

Perhaps it is better to clarify the decisions first in the deprecation notice, and document it later referencing it, instead of documenting it first.

I will try to separate the decision part from the KNI documentation.

Quoted 5 lines

and/or release notes.
Then, reword this as:

doc/guides/prog_guide/kernel_nic_interface.rst line 13

Quoted 1 line
doc/guides/prog_guide/kernel_nic_interface.rst +1 -0
+   Also there is a `long term plan <https://mails.dpdk.org/archives/dev/2021-May/209026.html>`_ to deprecate the KNI.
Quoted 9 lines

The long term plan..._ is* to deprecate KNI, see <XXX link to deprecation notice/release notes>.

doc/guides/prog_guide/kernel_nic_interface.rst line 15

Quoted 2 lines
doc/guides/prog_guide/kernel_nic_interface.rst +2 -0
+
+   :ref:`virtio_user_as_exceptional_path` alternative is preferred way for

is one/a* preferred way

ack

Quoted 4 lines

doc/guides/prog_guide/kernel_nic_interface.rst line 16

Quoted 1 line
doc/guides/prog_guide/kernel_nic_interface.rst +1 -0
+   interfacing with Linux network stack as it is being in-kernel solution and

interfacing with the* Linux network stack as it is a* in-kernel and

ack

Quoted 4 lines

doc/guides/prog_guide/kernel_nic_interface.rst line 17

Quoted 1 line
doc/guides/prog_guide/kernel_nic_interface.rst +1 -0
+   similar performance expectations.

has* similar performance expectations.

ack

Quoted 9 lines

doc/guides/prog_guide/kernel_nic_interface.rst line 21

Quoted 6 lines
doc/guides/prog_guide/kernel_nic_interface.rst +2 -1
+
  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

KNI provides* an interface ...

ack

Quoted 7 lines

doc/guides/prog_guide/kernel_nic_interface.rst line 25

Quoted 4 lines
doc/guides/prog_guide/kernel_nic_interface.rst +4 -0
+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

The* main use case of KNI is to* ...

ack

Quoted 15 lines

doc/guides/prog_guide/kernel_nic_interface.rst line 34

Quoted 9 lines
doc/guides/prog_guide/kernel_nic_interface.rst +9 -0
+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
+   <https://www.kernel.org/doc/Documentation/networking/tuntap.txt>`_
+
+#. :ref:`virtio_user_as_exceptional_path`
+

+1 to Olivier comment, for making virtio-user first.

Quoted 2 lines
doc/guides/prog_guide/kernel_nic_interface.rst +1 -0
+The benefits of using the DPDK KNI against alternatives are:
 
Quoted 8 lines

doc/guides/prog_guide/kernel_nic_interface.rst line 40

Quoted 5 lines
doc/guides/prog_guide/kernel_nic_interface.rst +1 -1
  *   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:

Not sure why we need an extra DPDK, KNI alone is enough.

ack

Quoted 14 lines

doc/guides/prog_guide/kernel_nic_interface.rst line 43

Quoted 4 lines
doc/guides/prog_guide/kernel_nic_interface.rst +3 -0
+
+* 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 as in OS vendors, right? ok for me.

Quoted 6 lines
doc/guides/prog_guide/kernel_nic_interface.rst +5 -0
+  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.
 
Quoted 5 lines

doc/guides/prog_guide/kernel_nic_interface.rst line 50

Quoted 2 lines
doc/guides/prog_guide/kernel_nic_interface.rst +1 -1
-*   Allows an interface with the kernel network stack.
+* Only a subset of control commands are supported by KNI.

of net devices control commands*

ack

Quoted 8 lines
Quoted 6 lines
doc/guides/prog_guide/kernel_nic_interface.rst +0 -1
  The components of an application using the DPDK Kernel NIC Interface are shown in :numref:`figure_kernel_nic_intf`.
 
--

2.31.1

#7 lore raw

PATCH v2 1/2 doc: note KNI alternatives

In reply to Ferruh Yigit

Add more information on alternatives of KNI and the cons of KNI against these alternatives.

---
Cc: Olivier Matz <[email protected]>
Cc: David Marchand <[email protected]>
Cc: Stephen Hemminger <[email protected]>
Cc: Elad Nachman <[email protected]>
Cc: Igor Ryzhov <[email protected]>
Cc: Dan Gora <[email protected]>

---
 doc/guides/nics/tap.rst                       |  2 ++
 .../prog_guide/kernel_nic_interface.rst       | 34 +++++++++++++++++--
 2 files changed, 33 insertions(+), 3 deletions(-)
doc/guides/nics/tap.rst +2 -0
index 681010d9ed7d..2ba98893d564 100644
@@ -1,6 +1,8 @@
 ..  SPDX-License-Identifier: BSD-3-Clause
     Copyright(c) 2016 Intel Corporation.
 
+.. _TunTap_PMD:
+
 Tun|Tap Poll Mode Driver
 ========================
 
doc/guides/prog_guide/kernel_nic_interface.rst +31 -3
index 1ce03ec1a374..70e92687d711 100644
@@ -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
+   <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 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`.
 
Signature · 1 line
2.31.1
#8 lore raw

PATCH v2 2/2 doc: announce KNI deprecation

Announce the KNI kernel module move to out of dpdk repo and announce long term plan to deprecate the KNI.

---
Cc: Olivier Matz <[email protected]>
Cc: David Marchand <[email protected]>
Cc: Stephen Hemminger <[email protected]>
Cc: Elad Nachman <[email protected]>
Cc: Igor Ryzhov <[email protected]>
Cc: Dan Gora <[email protected]>

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(+)
doc/guides/prog_guide/kernel_nic_interface.rst +2 -0
index 70e92687d711..276014fe28bb 100644
@@ -7,6 +7,8 @@ Kernel NIC Interface
 ====================
 
 .. Note::
+   KNI kernel module will be moved from main git repository to `dpdk-kmods <https://git.dpdk.org/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
doc/guides/rel_notes/deprecation.rst +6 -0
index 6d087c64ef28..62fd991e4eb4 100644
@@ -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 <https://git.dpdk.org/dpdk-kmods/>`_
+  repository by the `DPDK technical board decision
+  <https://mails.dpdk.org/archives/dev/2021-January/197077.html>`_, 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
Signature · 1 line
2.31.1
#9 lore raw

Re: [PATCH v2 2/2] doc: announce KNI deprecation

23/11/2021 13:08, Ferruh Yigit:

doc/guides/rel_notes/deprecation.rst Deprecation Notices · line 55

Quoted 7 lines
doc/guides/rel_notes/deprecation.rst +5 -0
+* kni: KNI kernel module will be moved to `dpdk-kmods <https://git.dpdk.org/dpdk-kmods/>`_
+  repository by the `DPDK technical board decision
+  <https://mails.dpdk.org/archives/dev/2021-January/197077.html>`_, on v22.11.
+* kni: will be depreciated, will remove all kni lib, kernel module and example code
+  on v23.11.

+1 for this plan

#10 lore raw

Re: [PATCH v2 1/2] doc: note KNI alternatives

In reply to Ferruh Yigit

23/11/2021 13:08, Ferruh Yigit:

doc/guides/nics/tap.rst line 4

Quoted 7 lines
doc/guides/nics/tap.rst +1 -0
@@ -1,6 +1,8 @@
 ..  SPDX-License-Identifier: BSD-3-Clause
     Copyright(c) 2016 Intel Corporation.
 
+.. _TunTap_PMD:

No need for such anchor at the beginning of a doc. You can reference a document with :doc:

[...]

doc/guides/nics/tap.rst

Quoted 6 lines
doc/guides/nics/tap.rst +6 -0
+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
+   <https://www.kernel.org/doc/Documentation/networking/tuntap.txt>`_

What about pcap, AF_PACKET and AF_XDP PMDs?

#11 lore raw

Re: [PATCH v2 1/2] doc: note KNI alternatives

Quoted 7 lines · Thomas Monjalon

23/11/2021 13:08, Ferruh Yigit:

Quoted 6 lines
doc/guides/nics/tap.rst +0 -0
@@ -1,6 +1,8 @@
  ..  SPDX-License-Identifier: BSD-3-Clause
      Copyright(c) 2016 Intel Corporation.
 
Quoted 5 lines

doc/guides/nics/tap.rst line 4

Quoted 1 line
doc/guides/nics/tap.rst +1 -0
+.. _TunTap_PMD:

No need for such anchor at the beginning of a doc. You can reference a document with :doc:

ack

Quoted 11 lines

[...]

doc/guides/nics/tap.rst

Quoted 6 lines
doc/guides/nics/tap.rst +6 -0
+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
+   <https://www.kernel.org/doc/Documentation/networking/tuntap.txt>`_

What about pcap, AF_PACKET and AF_XDP PMDs?

They are different, not exactly KNI alternative.

pcap, af_packet & af_xdp are on top of sockets for specific interface, KNI & virtio-user enables injecting packets to Linux networking stack without being tied to any existing interface.

#12 lore raw

PATCH v3 1/2 doc: note KNI alternatives

In reply to Ferruh Yigit

Add more information on alternatives of KNI and the cons of KNI against these alternatives.

---
Cc: Olivier Matz Olivier Matz <[email protected]>
Cc: David Marchand David Marchand <[email protected]>
Cc: Stephen Hemminger Stephen Hemminger <[email protected]>
Cc: Elad Nachman <[email protected]>
Cc: Igor Ryzhov <[email protected]>
Cc: Dan Gora <[email protected]>

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(-)
doc/guides/prog_guide/kernel_nic_interface.rst +31 -3
index 1ce03ec1a374..f5a8b7c0782c 100644
@@ -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`
+
+#. :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 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`.
 
Signature · 1 line
2.31.1
#13 lore raw

PATCH v3 2/2 doc: announce KNI deprecation

Announce the KNI kernel module move to out of dpdk repo and announce long term plan to deprecate the KNI.

---
Cc: Olivier Matz Olivier Matz <[email protected]>
Cc: David Marchand David Marchand <[email protected]>
Cc: Stephen Hemminger Stephen Hemminger <[email protected]>
Cc: Elad Nachman <[email protected]>
Cc: Igor Ryzhov <[email protected]>
Cc: Dan Gora <[email protected]>

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(+)
doc/guides/prog_guide/kernel_nic_interface.rst +2 -0
index f5a8b7c0782c..d1c5ccd0851d 100644
@@ -7,6 +7,8 @@ Kernel NIC Interface
 ====================
 
 .. Note::
+   KNI kernel module will be moved from main git repository to `dpdk-kmods <https://git.dpdk.org/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
doc/guides/rel_notes/deprecation.rst +6 -0
index 2262b8de6093..f20852504319 100644
@@ -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 <https://git.dpdk.org/dpdk-kmods/>`_
+  repository by the `DPDK technical board decision
+  <https://mails.dpdk.org/archives/dev/2021-January/197077.html>`_, 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
Signature · 1 line
2.31.1
Acked-by on v3 2/2
#14 lore raw

Re: [PATCH v3 2/2] doc: announce KNI deprecation

Quoted 5 lines · Ferruh Yigit

Announce the KNI kernel module move to out of dpdk repo and announce long term plan to deprecate the KNI.

Quoted 48 lines

---
Cc: Olivier Matz Olivier Matz <[email protected]>
Cc: David Marchand David Marchand <[email protected]>
Cc: Stephen Hemminger Stephen Hemminger <[email protected]>
Cc: Elad Nachman <[email protected]>
Cc: Igor Ryzhov <[email protected]>
Cc: Dan Gora <[email protected]>

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(+)
doc/guides/prog_guide/kernel_nic_interface.rst +2 -0
index f5a8b7c0782c..d1c5ccd0851d 100644
@@ -7,6 +7,8 @@ Kernel NIC Interface
 ====================
 
 .. Note::
+   KNI kernel module will be moved from main git repository to `dpdk-kmods <https://git.dpdk.org/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
doc/guides/rel_notes/deprecation.rst +6 -1
index 2262b8de6093..f20852504319 100644
@@ -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 <https://git.dpdk.org/dpdk-kmods/>`_
+  repository by the `DPDK technical board decision
+  <https://mails.dpdk.org/archives/dev/2021-January/197077.html>`_, 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
--

2.31.1

#15 lore raw

Re: [PATCH v3 2/2] doc: announce KNI deprecation

In reply to Ferruh Yigit

24/11/2021 18:16, Ferruh Yigit:

doc/guides/rel_notes/deprecation.rst Deprecation Notices · line 55

Quoted 11 lines

Announce the KNI kernel module move to out of dpdk repo and announce long term plan to deprecate the KNI.

doc/guides/rel_notes/deprecation.rst +5 -0
+* kni: KNI kernel module will be moved to `dpdk-kmods <https://git.dpdk.org/dpdk-kmods/>`_
+  repository by the `DPDK technical board decision
+  <https://mails.dpdk.org/archives/dev/2021-January/197077.html>`_, on v22.11.
+* kni: will be depreciated, will remove all kni lib, kernel module and example code
+  on v23.11.

Bruce sent a notice about the example code. The goal is to remove it in 22.11.

Bruce, should we merge this notice with yours for a clear plan?

#16 lore raw

Re: [PATCH v3 2/2] doc: announce KNI deprecation

Quoted 15 lines · Thomas Monjalon

24/11/2021 18:16, Ferruh Yigit:

doc/guides/rel_notes/deprecation.rst Deprecation Notices · line 55

Quoted 11 lines

Announce the KNI kernel module move to out of dpdk repo and announce long term plan to deprecate the KNI.

doc/guides/rel_notes/deprecation.rst +5 -0
+* kni: KNI kernel module will be moved to `dpdk-kmods <https://git.dpdk.org/dpdk-kmods/>`_
+  repository by the `DPDK technical board decision
+  <https://mails.dpdk.org/archives/dev/2021-January/197077.html>`_, on v22.11.
+* kni: will be depreciated, will remove all kni lib, kernel module and example code
+  on v23.11.

Bruce sent a notice about the example code. The goal is to remove it in 22.11.

Quoted 2 lines

Bruce, should we merge this notice with yours for a clear plan?

Yes, it would be good to do so. I won't have time to do a patch for this today, though.

#17 lore raw

PATCH v4 1/1 doc: announce KNI deprecation

In reply to Ferruh Yigit

From: Ferruh Yigit <[email protected]>

Announce the deprecation plan for KNI kernel module, library and example.

---
Squashed and updated 2 deprecations:
https://patches.dpdk.org/project/dpdk/patch/[email protected]/
https://patches.dpdk.org/project/dpdk/patch/[email protected]/

---
 doc/guides/prog_guide/kernel_nic_interface.rst | 3 +++
 doc/guides/rel_notes/deprecation.rst           | 9 +++++++++
 2 files changed, 12 insertions(+)
doc/guides/prog_guide/kernel_nic_interface.rst +3 -0
index e021cc69b6..03b5bca958 100644
@@ -8,6 +8,9 @@ Kernel NIC Interface
 
 .. note::
 
+   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`.
 
doc/guides/rel_notes/deprecation.rst +9 -0
index 4e5b23c53d..e54597c591 100644
@@ -48,6 +48,15 @@ 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: The KNI kernel module and library are not recommended for use by new
+  applications - other technologies such as virtio-user are recommended instead.
+  The KNI kernel module and library will be removed from DPDK 23.11,
+  following the DPDK technical board
+  `decision <https://mails.dpdk.org/archives/dev/2021-January/197077.html>`_
+  and `refinement <http://mails.dpdk.org/archives/dev/2022-June/243596.html>`_.
+  The first steps are to add deprecation warnings
+  and to remove the example application from 22.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
Signature · 1 line
2.36.1
#18 lore raw

Re: [PATCH v4] doc: announce KNI deprecation

13/07/2022 18:10, Thomas Monjalon:

Quoted 10 lines

From: Ferruh Yigit <[email protected]>

Announce the deprecation plan for KNI kernel module, library and example.

---
Squashed and updated 2 deprecations:
https://patches.dpdk.org/project/dpdk/patch/[email protected]/
https://patches.dpdk.org/project/dpdk/patch/[email protected]/

This is a mistake. The second deprecation squashed here is
https://patches.dpdk.org/project/dpdk/patch/[email protected]/

Quoted 40 lines
---
 doc/guides/prog_guide/kernel_nic_interface.rst | 3 +++
 doc/guides/rel_notes/deprecation.rst           | 9 +++++++++
 2 files changed, 12 insertions(+)
doc/guides/prog_guide/kernel_nic_interface.rst +3 -0
index e021cc69b6..03b5bca958 100644
@@ -8,6 +8,9 @@ Kernel NIC Interface
 
 .. note::
 
+   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`.
 
doc/guides/rel_notes/deprecation.rst +9 -0
index 4e5b23c53d..e54597c591 100644
@@ -48,6 +48,15 @@ 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: The KNI kernel module and library are not recommended for use by new
+  applications - other technologies such as virtio-user are recommended instead.
+  The KNI kernel module and library will be removed from DPDK 23.11,
+  following the DPDK technical board
+  `decision <https://mails.dpdk.org/archives/dev/2021-January/197077.html>`_
+  and `refinement <http://mails.dpdk.org/archives/dev/2022-June/243596.html>`_.
+  The first steps are to add deprecation warnings
+  and to remove the example application from 22.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
#19 lore raw

Re: [PATCH v4] doc: announce KNI deprecation

13/07/2022 21:51, Thomas Monjalon:

Quoted 12 lines

13/07/2022 18:10, Thomas Monjalon:

Quoted 10 lines

From: Ferruh Yigit <[email protected]>

Announce the deprecation plan for KNI kernel module, library and example.

---
Squashed and updated 2 deprecations:
https://patches.dpdk.org/project/dpdk/patch/[email protected]/
https://patches.dpdk.org/project/dpdk/patch/[email protected]/

Quoted 2 lines

This is a mistake. The second deprecation squashed here is
https://patches.dpdk.org/project/dpdk/patch/[email protected]/

Applied with minor improvements discussed in the thread:
- ordered list of actions
- PMD to be removed in 23.11

Acked-by on v4 1/1
#20 lore raw

Re: [PATCH v4] doc: announce KNI deprecation

In reply to Thomas Monjalon
Quoted 11 lines · Thomas Monjalon

From: Ferruh Yigit <[email protected]>

Announce the deprecation plan for KNI kernel module, library and example.

---
Squashed and updated 2 deprecations:
https://patches.dpdk.org/project/dpdk/patch/[email protected]/
https://patches.dpdk.org/project/dpdk/patch/[email protected]/
---

One suggestion below.
With corrected link and with/without suggested change:

Quoted 25 lines
 doc/guides/prog_guide/kernel_nic_interface.rst | 3 +++
 doc/guides/rel_notes/deprecation.rst           | 9 +++++++++
 2 files changed, 12 insertions(+)
doc/guides/prog_guide/kernel_nic_interface.rst +3 -0
index e021cc69b6..03b5bca958 100644
@@ -8,6 +8,9 @@ Kernel NIC Interface
 
 .. note::
 
+   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`.
 
doc/guides/rel_notes/deprecation.rst +0 -0
index 4e5b23c53d..e54597c591 100644
@@ -48,6 +48,15 @@ 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.

doc/guides/rel_notes/deprecation.rst Deprecation Notices · line 59

Quoted 10 lines
doc/guides/rel_notes/deprecation.rst +9 -0
 
+* kni: The KNI kernel module and library are not recommended for use by new
+  applications - other technologies such as virtio-user are recommended instead.
+  The KNI kernel module and library will be removed from DPDK 23.11,
+  following the DPDK technical board
+  `decision <https://mails.dpdk.org/archives/dev/2021-January/197077.html>`_
+  and `refinement <http://mails.dpdk.org/archives/dev/2022-June/243596.html>`_.
+  The first steps are to add deprecation warnings
+  and to remove the example application from 22.11.
+

I wonder whether having this done as bullet points in chronological order might be clearer. Something like:

* kni: The KNI kernel module and library are not recommended for use by new applications - other technologies such as virtio-user are recommended instead. Following the DPDK technical board
decision <https://mails.dpdk.org/archives/dev/2021-January/197077.html>_
and refinement <http://mails.dpdk.org/archives/dev/2022-June/243596.html>_:
* The KNI example application will be removed from DPDK 22.11 release
* The KNI kernel module and library will be removed from the DPDK 23.11 release

#21 lore raw

Re: [PATCH v4] doc: announce KNI deprecation

14/07/2022 11:20, Bruce Richardson:

Quoted 57 lines · Thomas Monjalon
Quoted 11 lines

From: Ferruh Yigit <[email protected]>

Announce the deprecation plan for KNI kernel module, library and example.

---
Squashed and updated 2 deprecations:
https://patches.dpdk.org/project/dpdk/patch/[email protected]/
https://patches.dpdk.org/project/dpdk/patch/[email protected]/
---

One suggestion below.
With corrected link and with/without suggested change:

Quoted 25 lines
 doc/guides/prog_guide/kernel_nic_interface.rst | 3 +++
 doc/guides/rel_notes/deprecation.rst           | 9 +++++++++
 2 files changed, 12 insertions(+)
doc/guides/prog_guide/kernel_nic_interface.rst +3 -0
index e021cc69b6..03b5bca958 100644
@@ -8,6 +8,9 @@ Kernel NIC Interface
 
 .. note::
 
+   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`.
 
doc/guides/rel_notes/deprecation.rst +0 -0
index 4e5b23c53d..e54597c591 100644
@@ -48,6 +48,15 @@ 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.

doc/guides/rel_notes/deprecation.rst Deprecation Notices · line 59

Quoted 10 lines
doc/guides/rel_notes/deprecation.rst +9 -0
 
+* kni: The KNI kernel module and library are not recommended for use by new
+  applications - other technologies such as virtio-user are recommended instead.
+  The KNI kernel module and library will be removed from DPDK 23.11,
+  following the DPDK technical board
+  `decision <https://mails.dpdk.org/archives/dev/2021-January/197077.html>`_
+  and `refinement <http://mails.dpdk.org/archives/dev/2022-June/243596.html>`_.
+  The first steps are to add deprecation warnings
+  and to remove the example application from 22.11.
+

I wonder whether having this done as bullet points in chronological order might be clearer. Something like:

Quoted 8 lines

* kni: The KNI kernel module and library are not recommended for use by new applications - other technologies such as virtio-user are recommended instead. Following the DPDK technical board
decision <https://mails.dpdk.org/archives/dev/2021-January/197077.html>_
and refinement <http://mails.dpdk.org/archives/dev/2022-June/243596.html>_:
* The KNI example application will be removed from DPDK 22.11 release
* The KNI kernel module and library will be removed from the DPDK 23.11 release

Yes I prefer your version. Bullets are always better :)

#22 lore raw

Re: [PATCH v4] doc: announce KNI deprecation

In reply to Bruce Richardson
Quoted 57 lines · Bruce Richardson
Quoted 11 lines · Thomas Monjalon

From: Ferruh Yigit <[email protected]>

Announce the deprecation plan for KNI kernel module, library and example.

---
Squashed and updated 2 deprecations:
https://patches.dpdk.org/project/dpdk/patch/[email protected]/
https://patches.dpdk.org/project/dpdk/patch/[email protected]/
---

One suggestion below.
With corrected link and with/without suggested change:

Quoted 25 lines
  doc/guides/prog_guide/kernel_nic_interface.rst | 3 +++
  doc/guides/rel_notes/deprecation.rst           | 9 +++++++++
  2 files changed, 12 insertions(+)
doc/guides/prog_guide/kernel_nic_interface.rst +3 -0
index e021cc69b6..03b5bca958 100644
@@ -8,6 +8,9 @@ Kernel NIC Interface
 
  .. note::
 
+   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`.
 
doc/guides/rel_notes/deprecation.rst +0 -0
index 4e5b23c53d..e54597c591 100644
@@ -48,6 +48,15 @@ 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.

doc/guides/rel_notes/deprecation.rst Deprecation Notices · line 59

Quoted 10 lines
doc/guides/rel_notes/deprecation.rst +9 -0
 
+* kni: The KNI kernel module and library are not recommended for use by new
+  applications - other technologies such as virtio-user are recommended instead.
+  The KNI kernel module and library will be removed from DPDK 23.11,
+  following the DPDK technical board
+  `decision <https://mails.dpdk.org/archives/dev/2021-January/197077.html>`_
+  and `refinement <http://mails.dpdk.org/archives/dev/2022-June/243596.html>`_.
+  The first steps are to add deprecation warnings
+  and to remove the example application from 22.11.
+

I wonder whether having this done as bullet points in chronological order might be clearer. Something like:

Quoted 8 lines

* kni: The KNI kernel module and library are not recommended for use by new applications - other technologies such as virtio-user are recommended instead. Following the DPDK technical board
decision <https://mails.dpdk.org/archives/dev/2021-January/197077.html>_
and refinement <http://mails.dpdk.org/archives/dev/2022-June/243596.html>_:
* The KNI example application will be removed from DPDK 22.11 release
* The KNI kernel module and library will be removed from the DPDK 23.11 release

+1 to list actions in chronological order

I have a concern with removing sample application without replacing one with alternate methods: virtio-user and tun/tap.

It is easy to create a virtio-user PMD by testpmd or any sample application, and as far as I understand Bruce already documented this. But for many KNI users they are not using KNI PMD, so replacing KNI with this new method may require some hand holding. One option can be hotplug the virtio-user PMD and use the port_id for packet forwarding, and I don't know if the PMD has APIs that applications can use directly, as done in KNI, @Maxime & @Chenbo can answer this better.

It can be good to have a sample application for above before deprecating the KNI sample application.
And same sample can use tun/tap PMD with a runtime parameter, to show how other example can be used, again tap can be used as tap PMD or Linux tun/tap APIs.

Question is who can work on such a sample, but if we can find some resource I am for having a replacement exception path sample app before deprecating KNI.

Thanks,
ferruh

#23 lore raw

Re: [PATCH v4] doc: announce KNI deprecation

Quoted 67 lines · Ferruh Yigit
Quoted 57 lines · Bruce Richardson
Quoted 11 lines · Thomas Monjalon

From: Ferruh Yigit <[email protected]>

Announce the deprecation plan for KNI kernel module, library and example.

---
Squashed and updated 2 deprecations:
https://patches.dpdk.org/project/dpdk/patch/[email protected]/
https://patches.dpdk.org/project/dpdk/patch/[email protected]/
---

One suggestion below.
With corrected link and with/without suggested change:

Quoted 27 lines

  doc/guides/prog_guide/kernel_nic_interface.rst | 3 +++ doc/guides/rel_notes/deprecation.rst           | 9 +++++++++

  2 files changed, 12 insertions(+)
doc/guides/prog_guide/kernel_nic_interface.rst +0 -0
index e021cc69b6..03b5bca958 100644
@@ -8,6 +8,9 @@ Kernel NIC Interface

  .. note::
+   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.

doc/guides/rel_notes/deprecation.rst +0 -0
index 4e5b23c53d..e54597c591 100644
@@ -48,6 +48,15 @@ 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: The KNI kernel module and library are not recommended for use by new
+  applications - other technologies such as virtio-user are recommended instead.
+  The KNI kernel module and library will be removed from DPDK 23.11,

Quoted 8 lines

+  following the DPDK technical board
+  `decision
<https://mails.dpdk.org/archives/dev/2021-January/197077.html>`_
+  and `refinement
<http://mails.dpdk.org/archives/dev/2022-June/243596.html>`_.
+  The first steps are to add deprecation warnings +  and to remove the example application from 22.11. +

I wonder whether having this done as bullet points in chronological order might be clearer. Something like:

Quoted 8 lines

* kni: The KNI kernel module and library are not recommended for use by new applications - other technologies such as virtio-user are recommended instead. Following the DPDK technical board
   decision <https://mails.dpdk.org/archives/dev/2021-January/197077.html>_
   and refinement <http://mails.dpdk.org/archives/dev/2022-June/243596.html>_:
   * The KNI example application will be removed from DPDK 22.11 release
   * The KNI kernel module and library will be removed from the DPDK 23.11 release

Quoted 5 lines

+1 to list actions in chronological order

I have a concern with removing sample application without replacing one with alternate methods: virtio-user and tun/tap.

It is easy to create a virtio-user PMD by testpmd or any sample application, and as far as I understand Bruce already documented this. But for many KNI users they are not using KNI PMD, so replacing KNI with this new method may require some hand holding.

As mentioned KNI PMD, it also should be removed when library and module are removed, may be good to list above to be explicit.

Quoted 12 lines

One option can be hotplug the virtio-user PMD and use the port_id for packet forwarding, and I don't know if the PMD has APIs that applications can use directly, as done in KNI, @Maxime & @Chenbo can answer this better.

It can be good to have a sample application for above before deprecating the KNI sample application.
And same sample can use tun/tap PMD with a runtime parameter, to show how other example can be used, again tap can be used as tap PMD or Linux tun/tap APIs.

Question is who can work on such a sample, but if we can find some resource I am for having a replacement exception path sample app before deprecating KNI.

Thanks,
ferruh

#24 lore raw

Re: [PATCH v4] doc: announce KNI deprecation

14/07/2022 17:03, Ferruh Yigit:

Quoted 84 lines · Ferruh Yigit
Quoted 83 lines · Bruce Richardson
Quoted 63 lines · Thomas Monjalon
Quoted 5 lines

From: Ferruh Yigit <[email protected]>

Announce the deprecation plan for KNI kernel module, library and example.

Quoted 7 lines

---
Squashed and updated 2 deprecations:
https://patches.dpdk.org/project/dpdk/patch/[email protected]/
https://patches.dpdk.org/project/dpdk/patch/[email protected]/
---

One suggestion below.
With corrected link and with/without suggested change:

Quoted 37 lines
  doc/guides/prog_guide/kernel_nic_interface.rst | 3 +++
  doc/guides/rel_notes/deprecation.rst           | 9 +++++++++
  2 files changed, 12 insertions(+)
doc/guides/prog_guide/kernel_nic_interface.rst +3 -0
index e021cc69b6..03b5bca958 100644
@@ -8,6 +8,9 @@ Kernel NIC Interface
  .. note::
+   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`.
doc/guides/rel_notes/deprecation.rst +0 -0
index 4e5b23c53d..e54597c591 100644
@@ -48,6 +48,15 @@ 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: The KNI kernel module and library are not recommended for use by new
+ applications - other technologies such as virtio-user are recommended instead.

doc/guides/rel_notes/deprecation.rst +3 -0
+  The KNI kernel module and library will be removed from DPDK 23.11,
+  following the DPDK technical board
+  `decision 

<https://mails.dpdk.org/archives/dev/2021-January/197077.html>`_
+ and `refinement
<http://mails.dpdk.org/archives/dev/2022-June/243596.html>`_.

doc/guides/rel_notes/deprecation.rst Deprecation Notices · line 59

Quoted 3 lines
doc/guides/rel_notes/deprecation.rst +3 -0
+  The first steps are to add deprecation warnings
+  and to remove the example application from 22.11.
+

I wonder whether having this done as bullet points in chronological order might be clearer. Something like:

Quoted 13 lines

* kni: The KNI kernel module and library are not recommended for use by new
applications - other technologies such as virtio-user are
recommended instead.
Following the DPDK technical board
`decision
<https://mails.dpdk.org/archives/dev/2021-January/197077.html>`_
and `refinement
<http://mails.dpdk.org/archives/dev/2022-June/243596.html>`_:
* The KNI example application will be removed from DPDK 22.11 release
* The KNI kernel module and library will be removed from the DPDK
23.11
release

+1 to list actions in chronological order

I have a concern with removing sample application without replacing one with alternate methods: virtio-user and tun/tap.

Quoted 7 lines
Quoted 4 lines

It is easy to create a virtio-user PMD by testpmd or any sample application, and as far as I understand Bruce already documented this. But for many KNI users they are not using KNI PMD, so replacing KNI with this new method may require some hand holding.

As mentioned KNI PMD, it also should be removed when library and module are removed, may be good to list above to be explicit.

Yes I'm adding the PMD in removal list.

Quoted 11 lines
Quoted 11 lines

One option can be hotplug the virtio-user PMD and use the port_id for packet forwarding, and I don't know if the PMD has APIs that applications can use directly, as done in KNI, @Maxime & @Chenbo can answer this better.

It can be good to have a sample application for above before deprecating the KNI sample application.
And same sample can use tun/tap PMD with a runtime parameter, to show how other example can be used, again tap can be used as tap PMD or Linux tun/tap APIs.

Quoted 3 lines
Quoted 3 lines

Question is who can work on such a sample, but if we can find some resource I am for having a replacement exception path sample app before deprecating KNI.

We are not sure we'll have time and resource,
and it has not been discussed earlier.
Thus I'll consider having a replacement example as a nice-to-have. I have to be a bit conservative with techboard decisions.

#26 lore raw

RE: [PATCH v3 1/2] doc: note KNI alternatives

In reply to Ferruh Yigit
Quoted 66 lines

From: Ferruh Yigit [mailto:[email protected]]
Sent: Wednesday, 24 November 2021 18.16

Add more information on alternatives of KNI and the cons of KNI against these alternatives.

---
Cc: Olivier Matz Olivier Matz <[email protected]>
Cc: David Marchand David Marchand <[email protected]>
Cc: Stephen Hemminger Stephen Hemminger <[email protected]>
Cc: Elad Nachman <[email protected]>
Cc: Igor Ryzhov <[email protected]>
Cc: Dan Gora <[email protected]>

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(-)
doc/guides/prog_guide/kernel_nic_interface.rst +3 -0
index 1ce03ec1a374..f5a8b7c0782c 100644
@@ -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

doc/guides/prog_guide/kernel_nic_interface.rst +2 -0
+   has similar performance expectations.
+
 The DPDK Kernel NIC Interface (KNI) allows userspace applications

access to the Linux* control plane.

doc/guides/prog_guide/kernel_nic_interface.rst +1 -1
-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``.

doc/guides/prog_guide/kernel_nic_interface.rst +2 -0
+
+The main use case of KNI is to get/receive exception packets from/to

Linux network

doc/guides/prog_guide/kernel_nic_interface.rst +3 -0
+stack while main datapath IO is done bypassing the networking stack.
+
+There are other alternatives to KNI, all are available in the upstream

Linux:

doc/guides/prog_guide/kernel_nic_interface.rst +7 -0
+
+#. :ref:`virtio_user_as_exceptional_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.

Quoted 3 lines

-* 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.)

Quoted 12 lines
doc/guides/prog_guide/kernel_nic_interface.rst +2 -0
+
+* 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.

doc/guides/prog_guide/kernel_nic_interface.rst +2 -0
+
+* 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

doc/guides/prog_guide/kernel_nic_interface.rst line 46

Quoted 4 lines
doc/guides/prog_guide/kernel_nic_interface.rst +2 -1
+  upstream the module.
 
-*   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.

Quoted 7 lines

The components of an application using the DPDK Kernel NIC Interface
are shown in :numref:figure_kernel_nic_intf.

--
2.31.1

Could you perhaps also promote the virtio-user documentation by moving it from the HowTo Guides to the Programmer's Guide?

-Morten

#27 lore raw

Re: [PATCH v3 1/2] doc: note KNI alternatives

Quoted 66 lines · Morten Brørup
Quoted 66 lines

From: Ferruh Yigit [mailto:[email protected]]
Sent: Wednesday, 24 November 2021 18.16

Add more information on alternatives of KNI and the cons of KNI against these alternatives.

---
Cc: Olivier Matz Olivier Matz <[email protected]>
Cc: David Marchand David Marchand <[email protected]>
Cc: Stephen Hemminger Stephen Hemminger <[email protected]>
Cc: Elad Nachman <[email protected]>
Cc: Igor Ryzhov <[email protected]>
Cc: Dan Gora <[email protected]>

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(-)
doc/guides/prog_guide/kernel_nic_interface.rst +3 -0
index 1ce03ec1a374..f5a8b7c0782c 100644
@@ -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

doc/guides/prog_guide/kernel_nic_interface.rst +2 -0
+   has similar performance expectations.
+
 The DPDK Kernel NIC Interface (KNI) allows userspace applications

access to the Linux* control plane.

doc/guides/prog_guide/kernel_nic_interface.rst +1 -1
-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``.

doc/guides/prog_guide/kernel_nic_interface.rst +2 -0
+
+The main use case of KNI is to get/receive exception packets from/to

Linux network

doc/guides/prog_guide/kernel_nic_interface.rst +3 -0
+stack while main datapath IO is done bypassing the networking stack.
+
+There are other alternatives to KNI, all are available in the upstream

Linux:

doc/guides/prog_guide/kernel_nic_interface.rst +7 -0
+
+#. :ref:`virtio_user_as_exceptional_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.

Quoted 6 lines
Quoted 3 lines

-* 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.)

Both fine for me, OK to use 'disadvantages'.

Quoted 14 lines
Quoted 14 lines
doc/guides/prog_guide/kernel_nic_interface.rst +2 -0
+
+* 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.

doc/guides/prog_guide/kernel_nic_interface.rst +2 -0
+
+* 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.

Quoted 6 lines

doc/guides/prog_guide/kernel_nic_interface.rst line 46

Quoted 2 lines
doc/guides/prog_guide/kernel_nic_interface.rst +1 -1
-*   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.

ack

Quoted 10 lines
Quoted 7 lines

The components of an application using the DPDK Kernel NIC Interface
are shown in :numref:figure_kernel_nic_intf.

--
2.31.1

Could you perhaps also promote the virtio-user documentation by moving it from the HowTo Guides to the Programmer's Guide?

Hi Morten,

This is an old patch, I assumed merged v4 by Thomas superseded this patch, but it seems this patch was not involved in that, so I will make a new version.

For the virtio-user documentation, no objection to move it to programmer's guide, I hope Maxime and Chenbo can help there.

#28 lore raw

PATCH v5 1/1 doc: note KNI alternatives

In reply to Ferruh Yigit

Add more information on alternatives of KNI and the disadvantages of KNI against these alternatives.

---
Cc: Olivier Matz <[email protected]>
Cc: David Marchand <[email protected]>
Cc: Stephen Hemminger <[email protected]>
Cc: Elad Nachman <[email protected]>
Cc: Igor Ryzhov <[email protected]>
Cc: Dan Gora <[email protected]>
Cc: Morten Brørup <[email protected]>

v5:
* Rebased
* Dedicated kernel core added as disadvantage

---
 .../prog_guide/kernel_nic_interface.rst       | 35 ++++++++++++++++---
 1 file changed, 30 insertions(+), 5 deletions(-)
doc/guides/prog_guide/kernel_nic_interface.rst +30 -5
index 6a564f61cad8..cac0ab0cb278 100644
@@ -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``, ``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_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 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.
+
+* 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`.
 
Signature · 1 line
2.25.1
#29 lore raw

Re: [PATCH v5] doc: note KNI alternatives

doc/guides/prog_guide/kernel_nic_interface.rst Kernel NIC Interface · line 48

Quoted 3 lines · On Thu, 24 Nov 2022 11:40:40 +0000 Ferruh Yigit <[email protected]> wrote:
doc/guides/prog_guide/kernel_nic_interface.rst +3 -0
+* 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.

To be precise, there is no legal restriction here. Maybe something that describes why the process is awkward.

* 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.

#30 lore raw

Re: [PATCH v5] doc: note KNI alternatives

Quoted 7 lines · Stephen Hemminger

doc/guides/prog_guide/kernel_nic_interface.rst Kernel NIC Interface · line 48

Quoted 3 lines · On Thu, 24 Nov 2022 11:40:40 +0000 Ferruh Yigit <[email protected]> wrote:
doc/guides/prog_guide/kernel_nic_interface.rst +3 -0
+* 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.
Quoted 6 lines

To be precise, there is no legal restriction here. Maybe something that describes why the process is awkward.

* 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.

ack, I will use above paragraph

#31 lore raw

PATCH v6 1/1 doc: note KNI alternatives

In reply to Ferruh Yigit

Add more information on alternatives of KNI and the disadvantages of KNI against these alternatives.

---
Cc: Olivier Matz <[email protected]>
Cc: David Marchand <[email protected]>
Cc: Stephen Hemminger <[email protected]>
Cc: Elad Nachman <[email protected]>
Cc: Igor Ryzhov <[email protected]>
Cc: Dan Gora <[email protected]>
Cc: Morten Brørup <[email protected]>

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(-)
doc/guides/prog_guide/kernel_nic_interface.rst +30 -5
index 6a564f61cad8..fe088f0c4508 100644
@@ -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`.
 
Signature · 1 line
2.25.1
#32 lore raw

Re: [PATCH v6] doc: note KNI alternatives

24/11/2022 18:15, Ferruh Yigit:

Quoted 4 lines

Add more information on alternatives of KNI and the disadvantages of KNI against these alternatives.

Applied, thanks.