From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 31CEFA0553; Fri, 10 Jun 2022 16:36:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CA5704069C; Fri, 10 Jun 2022 16:36:47 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id A657840689 for ; Fri, 10 Jun 2022 16:36:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654871805; x=1686407805; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=DtZdD4txXgVaBe/O9VCm9BFZyd2LkxrXxOilC1Pg32s=; b=Qu2Kkx5ISO3P+QJYu3iiRXv2N8y2nIGLxa8dRoWVk1PDHJ2MOSxq1rgR z5hufJpQbo+UaJrMdLBhSF/VjoLuLZ3M3KU57ooO9knAaIKdrQ/7mhpsC c3CuaRWl98akIXQnAvri4OHf5mYO+3R6P17sPB8SmhSz7N7ACznjngbuo b8tplWzs68c0NPlM7mpn7tOYofVhmPvtJ64tD+YD/1U+OAzigHsSElNQg g7RDBB1cZnqNKLUTxbE+D+U/nKGucyTPVjPfomPHh+GRrZN3cOnSFdHg5 BOfnFtH11akJOQ6bjZz1ZYzD2x76kxo2tEWvVN6UtiMzC1JuQaXX4V9F7 A==; X-IronPort-AV: E=McAfee;i="6400,9594,10374"; a="276426106" X-IronPort-AV: E=Sophos;i="5.91,290,1647327600"; d="scan'208";a="276426106" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2022 07:36:44 -0700 X-IronPort-AV: E=Sophos;i="5.91,290,1647327600"; d="scan'208";a="638165165" Received: from bricha3-mobl.ger.corp.intel.com ([10.55.133.106]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 10 Jun 2022 07:36:43 -0700 Date: Fri, 10 Jun 2022 15:36:40 +0100 From: Bruce Richardson To: "Xia, Chenbo" Cc: "dev@dpdk.org" , Maxime Coquelin Subject: Re: [PATCH v2 1/2] doc/howto: rework section on virtio-user as exception path Message-ID: References: <20220527162659.129022-1-bruce.richardson@intel.com> <20220527163643.130679-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Mon, May 30, 2022 at 06:33:14AM +0100, Xia, Chenbo wrote: > Hi Bruce, > > > -----Original Message----- > > From: Richardson, Bruce > > Sent: Saturday, May 28, 2022 12:37 AM > > To: dev@dpdk.org > > Cc: Maxime Coquelin ; Xia, Chenbo > > ; Richardson, Bruce > > Subject: [PATCH v2 1/2] doc/howto: rework section on virtio-user as > > exception path > > > > This patch extensively reworks the howto guide on using virtio-user for > > exception packets. Changes include: > > > > * rename "exceptional path" to "exception path" > > * remove references to uio and just reference vfio-pci > > * simplify testpmd command-lines, giving a basic usage example first > > before adding on detail about checksum or TSO parameters > > * give a complete working example showing traffic flowing through the > > whole system from a testpmd loopback using the created TAP netdev > > * replace use of "ifconfig" with Linux standard "ip" command > > * other general rewording. > > > > Signed-off-by: Bruce Richardson > > > > --- > > v2: fix checkpatch warnings > > --- > > .../howto/virtio_user_as_exceptional_path.rst | 159 +++++++++++------- > > I agree with the renaming. And should we rename this file, and if possible, the > attached img too. > I wasn't sure of the value of doing such a rename - afraid it might clobber up the git history. I'll add it as a separate patch in a v3. > > 1 file changed, 100 insertions(+), 59 deletions(-) > > > > diff --git a/doc/guides/howto/virtio_user_as_exceptional_path.rst > > b/doc/guides/howto/virtio_user_as_exceptional_path.rst > > index ec021af399..100376c32d 100644 > > --- a/doc/guides/howto/virtio_user_as_exceptional_path.rst > > +++ b/doc/guides/howto/virtio_user_as_exceptional_path.rst > > @@ -3,116 +3,157 @@ > > > > .. _virtio_user_as_exceptional_path: > > > > -Virtio_user as Exceptional Path > > -=============================== > > +Virtio_user as Exception Path > > +============================= > > > > -The virtual device, virtio-user, was originally introduced with vhost- > > user > > -backend, as a high performance solution for IPC (Inter-Process > > Communication) > > +.. note:: > > + > > + This solution is only applicable to Linux systems. > > + > > +The virtual device, virtio-user, was originally introduced with the > > vhost-user > > +backend as a high performance solution for IPC (Inter-Process > > Communication) > > and user space container networking. > > > > -Virtio_user with vhost-kernel backend is a solution for exceptional path, > > -such as KNI which exchanges packets with kernel networking stack. This > > -solution is very promising in: > > +Beyond this originally intended use, virtio-user can be used in > > conjunction with the vhost-kernel > > +backend as a solution for dealing with exception path packets which need > > to be injected into the > > +Linux kernel for processing there. > > +In this regard, virtio-user and vhost in kernel space are an alternative > > to DPDK KNI for > > +transferring packets between a DPDK packet processing application and the > > kernel stack. > > + > > +This solution has a number of advantages over alternatives such as KNI: > > > > * Maintenance > > > > All kernel modules needed by this solution, vhost and vhost-net > > (kernel), > > - are upstreamed and extensively used kernel module. > > + are upstreamed and extensively used. > > > > * Features > > > > - vhost-net is born to be a networking solution, which has lots of > > networking > > - related features, like multi queue, tso, multi-seg mbuf, etc. > > + vhost-net is designed to be a networking solution, and, as such, has > > lots of networking > > + related features, such as multi queue support, TSO, multi-segment > > buffer support, etc. > > > > * Performance > > > > - similar to KNI, this solution would use one or more kthreads to > > - send/receive packets to/from user space DPDK applications, which has > > little > > - impact on user space polling thread (except that it might enter into > > kernel > > - space to wake up those kthreads if necessary). > > + similar to KNI, this solution would uses one or more kthreads to > > + send/receive packets to/from user space DPDK applications, which > > minimises the impact > > + on the polling DPDK threads. > > > > -The overview of an application using virtio-user as exceptional path is > > shown > > +The overview of an application using virtio-user as exception path is > > shown > > in :numref:`figure_virtio_user_as_exceptional_path`. > > > > .. _figure_virtio_user_as_exceptional_path: > > > > .. figure:: img/virtio_user_as_exceptional_path.* > > > > - Overview of a DPDK app using virtio-user as exceptional path > > + Overview of a DPDK app using virtio-user as exception path > > + > > > > +Example Usage With Testpmd > > +--------------------------- > > > > -Sample Usage > > ------------- > > +.. note:: > > + > > + These instruction assume that the vhost/vhost-net kernel modules are > > available and have already > > + been loaded into the running kernel. > > + It also assumes that the DPDK virtio driver has not been disabled in > > the DPDK build. > > > > -As a prerequisite, the vhost/vhost-net kernel CONFIG should be chosen > > before > > -compiling the kernel and those kernel modules should be inserted. > > +To run a simple test of virtio-user as exception path using testpmd: > > > > -#. Compile DPDK and bind a physical NIC to igb_uio/uio_pci_generic/vfio- > > pci. > > +#. Compile DPDK and bind a NIC to vfio-pci as documented > > in :ref:`linux_gsg_linux_drivers`. > > > > - This physical NIC is for communicating with outside. > > + This physical NIC is for communicating with the outside world, > > + and serves as a packet source in this example. > > > > -#. Run testpmd. > > +#. Run testpmd to forward packets from NIC to kernel, > > + passing in a suitable list of logical cores to run on (``- > > l``.parameter), > > This '.' should be a space? > Thanks, good catch.