doc: note KNI alternatives and deprecation plan
Checks
Commit Message
Add a note that KNI kernel module will be moved to dpdk-kmods git repo
and there is a long term plan to deprecate it.
Also add some more details on the alternatives to KNI and cons of the
KNI against these alternatives.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
doc/guides/nics/tap.rst | 2 +
.../prog_guide/kernel_nic_interface.rst | 38 +++++++++++++++++--
2 files changed, 37 insertions(+), 3 deletions(-)
Comments
On Wed, 23 Jun 2021 18:31:42 +0100
Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> Add a note that KNI kernel module will be moved to dpdk-kmods git repo
> and there is a long term plan to deprecate it.
>
> Also add some more details on the alternatives to KNI and cons of the
> KNI against these alternatives.
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
> doc/guides/nics/tap.rst | 2 +
> .../prog_guide/kernel_nic_interface.rst | 38 +++++++++++++++++--
> 2 files changed, 37 insertions(+), 3 deletions(-)
>
> diff --git a/doc/guides/nics/tap.rst b/doc/guides/nics/tap.rst
> index 3ce696b605d1..07315fe32422 100644
> --- a/doc/guides/nics/tap.rst
> +++ b/doc/guides/nics/tap.rst
> @@ -1,6 +1,8 @@
> .. SPDX-License-Identifier: BSD-3-Clause
> Copyright(c) 2016 Intel Corporation.
>
> +.. _TunTap_PMD:
> +
> Tun|Tap Poll Mode Driver
> ========================
>
> diff --git a/doc/guides/prog_guide/kernel_nic_interface.rst b/doc/guides/prog_guide/kernel_nic_interface.rst
> index 1ce03ec1a374..29f8c92fd9d6 100644
> --- a/doc/guides/prog_guide/kernel_nic_interface.rst
> +++ b/doc/guides/prog_guide/kernel_nic_interface.rst
> @@ -6,16 +6,48 @@
> Kernel NIC Interface
> ====================
>
> +.. Note::
> +
> + KNI kernel module will be removed from main git repository to `dpdk-kmods <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`.
>
You should also link to virtio user as exception path. In my testing virtio is as fast as KNI and uses less CPU.
On 6/23/2021 7:33 PM, Stephen Hemminger wrote:
> On Wed, 23 Jun 2021 18:31:42 +0100
> Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>
>> Add a note that KNI kernel module will be moved to dpdk-kmods git repo
>> and there is a long term plan to deprecate it.
>>
>> Also add some more details on the alternatives to KNI and cons of the
>> KNI against these alternatives.
>>
>> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
>> ---
>> doc/guides/nics/tap.rst | 2 +
>> .../prog_guide/kernel_nic_interface.rst | 38 +++++++++++++++++--
>> 2 files changed, 37 insertions(+), 3 deletions(-)
>>
>> diff --git a/doc/guides/nics/tap.rst b/doc/guides/nics/tap.rst
>> index 3ce696b605d1..07315fe32422 100644
>> --- a/doc/guides/nics/tap.rst
>> +++ b/doc/guides/nics/tap.rst
>> @@ -1,6 +1,8 @@
>> .. SPDX-License-Identifier: BSD-3-Clause
>> Copyright(c) 2016 Intel Corporation.
>>
>> +.. _TunTap_PMD:
>> +
>> Tun|Tap Poll Mode Driver
>> ========================
>>
>> diff --git a/doc/guides/prog_guide/kernel_nic_interface.rst b/doc/guides/prog_guide/kernel_nic_interface.rst
>> index 1ce03ec1a374..29f8c92fd9d6 100644
>> --- a/doc/guides/prog_guide/kernel_nic_interface.rst
>> +++ b/doc/guides/prog_guide/kernel_nic_interface.rst
>> @@ -6,16 +6,48 @@
>> Kernel NIC Interface
>> ====================
>>
>> +.. Note::
>> +
>> + KNI kernel module will be removed from main git repository to `dpdk-kmods <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`.
>>
>
> 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.
Hi Ferruh,
Few minor comments below.
On Wed, Jun 23, 2021 at 06:31:42PM +0100, Ferruh Yigit wrote:
> Add a note that KNI kernel module will be moved to dpdk-kmods git repo
> and there is a long term plan to deprecate it.
>
> Also add some more details on the alternatives to KNI and cons of the
> KNI against these alternatives.
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
> doc/guides/nics/tap.rst | 2 +
> .../prog_guide/kernel_nic_interface.rst | 38 +++++++++++++++++--
> 2 files changed, 37 insertions(+), 3 deletions(-)
>
> diff --git a/doc/guides/nics/tap.rst b/doc/guides/nics/tap.rst
> index 3ce696b605d1..07315fe32422 100644
> --- a/doc/guides/nics/tap.rst
> +++ b/doc/guides/nics/tap.rst
> @@ -1,6 +1,8 @@
> .. SPDX-License-Identifier: BSD-3-Clause
> Copyright(c) 2016 Intel Corporation.
>
> +.. _TunTap_PMD:
> +
> Tun|Tap Poll Mode Driver
> ========================
>
> diff --git a/doc/guides/prog_guide/kernel_nic_interface.rst b/doc/guides/prog_guide/kernel_nic_interface.rst
> index 1ce03ec1a374..29f8c92fd9d6 100644
> --- a/doc/guides/prog_guide/kernel_nic_interface.rst
> +++ b/doc/guides/prog_guide/kernel_nic_interface.rst
> @@ -6,16 +6,48 @@
> Kernel NIC Interface
> ====================
>
> +.. Note::
> +
> + KNI kernel module will be removed from main git repository to `dpdk-kmods <https://git.dpdk.org/dpdk-kmods/>`_
removed -> moved?
Or "removed from main and moved to"
> + 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`
Shouldn't virtio_user be the first item?
> +
> +The benefits of using the DPDK KNI against alternatives are:
>
> * Faster than existing Linux TUN/TAP interfaces
> (by eliminating system calls and copy_to_user()/copy_from_user() operations.
>
> -* Allows management of DPDK ports using standard Linux net tools such as ethtool, ifconfig and tcpdump.
> +The cons of the DPDK KNI are:
> +
> +* It is out-of-tree Linux kernel module and it can't be distributed as binary as
> + part of OSV DPDK packages. This makes it harder to consume, although it is
OSV -> OVS
> + always possible to compile it from the source code.
> +
> +* As it shares memory between userspace and kernelspace, and kernel part
> + directly uses input provided by userspace, it is not safe. This makes hard to
> + upstream the module.
>
> -* Allows an interface with the kernel network stack.
> +* Only a subset of control commands are supported by KNI.
>
> The components of an application using the DPDK Kernel NIC Interface are shown in :numref:`figure_kernel_nic_intf`.
>
> --
> 2.31.1
>
On Wed, Jun 23, 2021 at 7:32 PM Ferruh Yigit <ferruh.yigit@intel.com> 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.
Some suggestions on wording below, feel free to ignore if this sounds
like French ;-).
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
> doc/guides/nics/tap.rst | 2 +
> .../prog_guide/kernel_nic_interface.rst | 38 +++++++++++++++++--
> 2 files changed, 37 insertions(+), 3 deletions(-)
>
> diff --git a/doc/guides/nics/tap.rst b/doc/guides/nics/tap.rst
> index 3ce696b605d1..07315fe32422 100644
> --- a/doc/guides/nics/tap.rst
> +++ b/doc/guides/nics/tap.rst
> @@ -1,6 +1,8 @@
> .. SPDX-License-Identifier: BSD-3-Clause
> Copyright(c) 2016 Intel Corporation.
>
> +.. _TunTap_PMD:
> +
> Tun|Tap Poll Mode Driver
> ========================
>
> diff --git a/doc/guides/prog_guide/kernel_nic_interface.rst b/doc/guides/prog_guide/kernel_nic_interface.rst
> index 1ce03ec1a374..29f8c92fd9d6 100644
> --- a/doc/guides/prog_guide/kernel_nic_interface.rst
> +++ b/doc/guides/prog_guide/kernel_nic_interface.rst
> @@ -6,16 +6,48 @@
> Kernel NIC Interface
> ====================
>
> +.. Note::
> +
> + KNI kernel module will be removed from main git repository to `dpdk-kmods <https://git.dpdk.org/dpdk-kmods/>`_
The* KNI kernel module will be moved* (Olivier comment) to ...
> + 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:
> + 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>.
> +
> + :ref:`virtio_user_as_exceptional_path` alternative is preferred way for
is one/a* preferred way
> + 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
> + similar performance expectations.
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 allows an interface with the kernel network stack and allows management of
KNI provides* an interface ...
> +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* ...
> +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.
> +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.
> +
> +* 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.
> + 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*
>
> The components of an application using the DPDK Kernel NIC Interface are shown in :numref:`figure_kernel_nic_intf`.
>
> --
> 2.31.1
>
On 7/30/2021 1:48 PM, Olivier Matz wrote:
> Hi Ferruh,
>
> Few minor comments below.
>
> On Wed, Jun 23, 2021 at 06:31:42PM +0100, Ferruh Yigit wrote:
>> Add a note that KNI kernel module will be moved to dpdk-kmods git repo
>> and there is a long term plan to deprecate it.
>>
>> Also add some more details on the alternatives to KNI and cons of the
>> KNI against these alternatives.
>>
>> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
>> ---
>> doc/guides/nics/tap.rst | 2 +
>> .../prog_guide/kernel_nic_interface.rst | 38 +++++++++++++++++--
>> 2 files changed, 37 insertions(+), 3 deletions(-)
>>
>> diff --git a/doc/guides/nics/tap.rst b/doc/guides/nics/tap.rst
>> index 3ce696b605d1..07315fe32422 100644
>> --- a/doc/guides/nics/tap.rst
>> +++ b/doc/guides/nics/tap.rst
>> @@ -1,6 +1,8 @@
>> .. SPDX-License-Identifier: BSD-3-Clause
>> Copyright(c) 2016 Intel Corporation.
>>
>> +.. _TunTap_PMD:
>> +
>> Tun|Tap Poll Mode Driver
>> ========================
>>
>> diff --git a/doc/guides/prog_guide/kernel_nic_interface.rst b/doc/guides/prog_guide/kernel_nic_interface.rst
>> index 1ce03ec1a374..29f8c92fd9d6 100644
>> --- a/doc/guides/prog_guide/kernel_nic_interface.rst
>> +++ b/doc/guides/prog_guide/kernel_nic_interface.rst
>> @@ -6,16 +6,48 @@
>> Kernel NIC Interface
>> ====================
>>
>> +.. Note::
>> +
>> + KNI kernel module will be removed from main git repository to `dpdk-kmods <https://git.dpdk.org/dpdk-kmods/>`_
>
> removed -> moved?
>
ack
> Or "removed from main and moved to"
>
>> + 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`
>
> Shouldn't virtio_user be the first item?
>
ack
>> +
>> +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
>
I mean 'Operating System Vendor', I will use long version to prevent confusion.
>> + always possible to compile it from the source code.
>> +
>> +* As it shares memory between userspace and kernelspace, and kernel part
>> + directly uses input provided by userspace, it is not safe. This makes hard to
>> + upstream the module.
>>
>> -* Allows an interface with the kernel network stack.
>> +* Only a subset of control commands are supported by KNI.
>>
>> The components of an application using the DPDK Kernel NIC Interface are shown in :numref:`figure_kernel_nic_intf`.
>>
>> --
>> 2.31.1
>>
On 8/20/2021 1:58 PM, David Marchand wrote:
> On Wed, Jun 23, 2021 at 7:32 PM Ferruh Yigit <ferruh.yigit@intel.com> 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.
>
> Some suggestions on wording below, feel free to ignore if this sounds
> like French ;-).
>
>
>>
>> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
>> ---
>> doc/guides/nics/tap.rst | 2 +
>> .../prog_guide/kernel_nic_interface.rst | 38 +++++++++++++++++--
>> 2 files changed, 37 insertions(+), 3 deletions(-)
>>
>> diff --git a/doc/guides/nics/tap.rst b/doc/guides/nics/tap.rst
>> index 3ce696b605d1..07315fe32422 100644
>> --- a/doc/guides/nics/tap.rst
>> +++ b/doc/guides/nics/tap.rst
>> @@ -1,6 +1,8 @@
>> .. SPDX-License-Identifier: BSD-3-Clause
>> Copyright(c) 2016 Intel Corporation.
>>
>> +.. _TunTap_PMD:
>> +
>> Tun|Tap Poll Mode Driver
>> ========================
>>
>> diff --git a/doc/guides/prog_guide/kernel_nic_interface.rst b/doc/guides/prog_guide/kernel_nic_interface.rst
>> index 1ce03ec1a374..29f8c92fd9d6 100644
>> --- a/doc/guides/prog_guide/kernel_nic_interface.rst
>> +++ b/doc/guides/prog_guide/kernel_nic_interface.rst
>> @@ -6,16 +6,48 @@
>> Kernel NIC Interface
>> ====================
>>
>> +.. Note::
>> +
>
>> + KNI kernel module will be removed from main git repository to `dpdk-kmods <https://git.dpdk.org/dpdk-kmods/>`_
> The* KNI kernel module will be moved* (Olivier comment) to ...
>
>> + 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.
> and/or release notes.
> Then, reword this as:
>
>> + 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>.
>
>
>> +
>> + :ref:`virtio_user_as_exceptional_path` alternative is preferred way for
>
> is one/a* preferred way
>
ack
>> + 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
>> + similar performance expectations.
>
> has* similar performance expectations.
>
ack
>
>> +
>> 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
>> +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
>> +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.
>
>
>> +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.
>
ack
>
>> +
>> +* 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.
>
>
>> + 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*
>
ack
>>
>> The components of an application using the DPDK Kernel NIC Interface are shown in :numref:`figure_kernel_nic_intf`.
>>
>> --
>> 2.31.1
>>
>
>
@@ -1,6 +1,8 @@
.. SPDX-License-Identifier: BSD-3-Clause
Copyright(c) 2016 Intel Corporation.
+.. _TunTap_PMD:
+
Tun|Tap Poll Mode Driver
========================
@@ -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`.