From: Morten Brørup <mb@smartsharesystems.com> To: "Ferruh Yigit" <ferruh.yigit@intel.com> Cc: <dev@dpdk.org>, "Olivier Matz Olivier Matz" <olivier.matz@6wind.com>, "David Marchand David Marchand" <david.marchand@redhat.com>, "Stephen Hemminger Stephen Hemminger" <stephen@networkplumber.org>, "Elad Nachman" <eladv6@gmail.com>, "Igor Ryzhov" <iryzhov@nfware.com>, "Dan Gora" <dg@adax.com> Subject: RE: [PATCH v3 1/2] doc: note KNI alternatives Date: Wed, 1 Dec 2021 17:31:14 +0100 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35D86D2D@smartserver.smartshare.dk> (raw) In-Reply-To: <20211124171609.3101896-1-ferruh.yigit@intel.com> > From: Ferruh Yigit [mailto:ferruh.yigit@intel.com] > Sent: Wednesday, 24 November 2021 18.16 > > Add more information on alternatives of KNI and the cons of KNI against > these alternatives. > > Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com> > --- > Cc: Olivier Matz Olivier Matz <olivier.matz@6wind.com> > Cc: David Marchand David Marchand <david.marchand@redhat.com> > Cc: Stephen Hemminger Stephen Hemminger <stephen@networkplumber.org> > Cc: Elad Nachman <eladv6@gmail.com> > Cc: Igor Ryzhov <iryzhov@nfware.com> > Cc: Dan Gora <dg@adax.com> > > 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(-) > > diff --git a/doc/guides/prog_guide/kernel_nic_interface.rst > b/doc/guides/prog_guide/kernel_nic_interface.rst > index 1ce03ec1a374..f5a8b7c0782c 100644 > --- a/doc/guides/prog_guide/kernel_nic_interface.rst > +++ b/doc/guides/prog_guide/kernel_nic_interface.rst > @@ -6,16 +6,44 @@ > Kernel NIC Interface > ==================== > > +.. 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: Consider if "disadvantages" is more appropriate than "cons". (I'm not a native English speaker.) > + > +* It is out-of-tree Linux kernel module and it can't be distributed as > binary as > + part of operating system vendor DPDK packages. This makes it harder > to > + consume, although it is always possible to compile it from the > source code. > + > +* As it shares memory between userspace and kernelspace, and kernel > part > + directly uses input provided by userspace, it is not safe. This > makes hard to > + upstream the module. > > -* 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. > > 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
prev parent reply other threads:[~2021-12-01 16:31 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-06-23 17:31 [dpdk-dev] [PATCH] doc: note KNI alternatives and deprecation plan Ferruh Yigit 2021-06-23 18:33 ` Stephen Hemminger 2021-06-24 8:19 ` Ferruh Yigit 2021-07-30 12:48 ` Olivier Matz 2021-11-23 10:21 ` Ferruh Yigit 2021-08-20 12:58 ` David Marchand 2021-11-23 10:42 ` Ferruh Yigit 2021-11-23 12:08 ` [PATCH v2 1/2] doc: note KNI alternatives Ferruh Yigit 2021-11-23 12:08 ` [PATCH v2 2/2] doc: announce KNI deprecation Ferruh Yigit 2021-11-24 14:00 ` Thomas Monjalon 2021-11-24 13:58 ` [PATCH v2 1/2] doc: note KNI alternatives Thomas Monjalon 2021-11-24 14:19 ` Ferruh Yigit 2021-11-24 17:16 ` [PATCH v3 " Ferruh Yigit 2021-11-24 17:16 ` [PATCH v3 2/2] doc: announce KNI deprecation Ferruh Yigit 2021-12-01 16:31 ` Morten Brørup [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=98CBD80474FA8B44BF855DF32C47DC35D86D2D@smartserver.smartshare.dk \ --to=mb@smartsharesystems.com \ --cc=david.marchand@redhat.com \ --cc=dev@dpdk.org \ --cc=dg@adax.com \ --cc=eladv6@gmail.com \ --cc=ferruh.yigit@intel.com \ --cc=iryzhov@nfware.com \ --cc=olivier.matz@6wind.com \ --cc=stephen@networkplumber.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
DPDK patches and discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://inbox.dpdk.org/dev/0 dev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 dev dev/ http://inbox.dpdk.org/dev \ dev@dpdk.org public-inbox-index dev Example config snippet for mirrors. Newsgroup available over NNTP: nntp://inbox.dpdk.org/inbox.dpdk.dev AGPL code for this site: git clone https://public-inbox.org/public-inbox.git