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 5EB86A0093; Mon, 20 Jun 2022 03:57:00 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EDEBA40223; Mon, 20 Jun 2022 03:56:59 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 0A08D40150 for ; Mon, 20 Jun 2022 03:56:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655690218; x=1687226218; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=jtW9QAhyNT7QYtGzqxAEs1q7RnW41Yh27+6tmE6QZDE=; b=EL3ST3NzsTk60YFzSZYxWSffiSpKD2JAgiX02wAJX+7nGXG1AKkDHBKA 1V0sI0vzv8coiX2WXLuQGSx1AaFE9DoYD6bZtA+QMI4xxYD+k+MhNAQvi BJGixMFgCyEqVYa5HxQzK6uH1mQ1MGmytkL+Qa9XQvdoPnXSjrPgls3xR FrwUnDhQiAOujEE96DIFQlzWtJDPv0O3zsDzGkf7MnELTMANeZAz56Wj/ iVc6qtfA+gWM9NZuX32eKcRBQ2UScd8lQKQ0UW6M2r1OSw0S1skZSR5kr OgTnLj6wiXsjaDdAT25nuSzlS4KcR5Z9em3s+Mz/6qbdHMEPl6UjHUEWz g==; X-IronPort-AV: E=McAfee;i="6400,9594,10380"; a="280839800" X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="280839800" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jun 2022 18:56:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="642878030" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by fmsmga008.fm.intel.com with ESMTP; 19 Jun 2022 18:56:55 -0700 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Sun, 19 Jun 2022 18:56:55 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Sun, 19 Jun 2022 18:56:55 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.107) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Sun, 19 Jun 2022 18:56:55 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XCKcHzZF6J7tAnJrh3UM8X9hwIwkQZInB36HTsI0VBZBoRTjl3vn6rEQo4Qs6sh3obMRVWE7qpZDW2dHC8xCRkAVmwmonVrSBpr/mL2eRYXDl/9xo8cKmW6IBdsB0XzkTPQGGR6v/N7XLY6oSerHIAaJFU2tF8VoLcPcoHn2DlY1fwXXZEqyFRNf7b5FZpscDiIsR/1jo4Q47wXMLhnNOuhzEry564EtOK+iCAUzWFI3pPwK5Em6eCdQj5OXjqATEGUofBDrW8bsGBv4VzQp9Bk8g2vlpZ1CjzRHX9qF7rXnJVjBbKWrTkW2hkqkLyakl4M76J5mm/ER7xbitKsEyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Y+I3bWalwwogy6lGdbF9jLYrznX24avdLjMUrZeQYG4=; b=nR7ckAGCOsp+Q5NBOniwFmYiYlJ+Q+dw17nABnqVBvkbBQQbosIlmpWaeqXZ2aiBMWM0iG3oe7g52KJ57qhsF2aJ/RP1/uWEogGkwdK9lQF3Vz8cwkccLCkl/r/qzNfpshVNI3uB7J/FpSsUm/ygPxjfUz0MiZoZOstQepQ6uUg0emAePD3SJR8o4artYX1KLV+ss7brEHtpoKzP2pZYSI9wz1KMZIGNijmg16ppke8Nz3X1dn2NPEiXxZWSGv4RranDXdchL5DYk5JYoq1DZcyooAaKP618tq76OibiJNy+Ya8ykthHAuigpO8Gw4hIk4TWhKlNvPx5dOEQ8Z4yow== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from SN6PR11MB3504.namprd11.prod.outlook.com (2603:10b6:805:d0::17) by DM8PR11MB5751.namprd11.prod.outlook.com (2603:10b6:8:12::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.15; Mon, 20 Jun 2022 01:56:53 +0000 Received: from SN6PR11MB3504.namprd11.prod.outlook.com ([fe80::54a0:2dbc:18b7:2aa9]) by SN6PR11MB3504.namprd11.prod.outlook.com ([fe80::54a0:2dbc:18b7:2aa9%7]) with mapi id 15.20.5353.021; Mon, 20 Jun 2022 01:56:53 +0000 From: "Xia, Chenbo" To: "Lipiec, Herakliusz" , "maxime.coquelin@redhat.com" , "Richardson, Bruce" CC: "dev@dpdk.org" Subject: RE: [PATCH 2/3] doc: update vhost sample app docs Thread-Topic: [PATCH 2/3] doc: update vhost sample app docs Thread-Index: AQHYemP+apGZTbrWqkaCtOG/F68pH61Xm8og Date: Mon, 20 Jun 2022 01:56:53 +0000 Message-ID: References: <20220607114856.1085803-1-herakliusz.lipiec@intel.com> <20220607114856.1085803-2-herakliusz.lipiec@intel.com> In-Reply-To: <20220607114856.1085803-2-herakliusz.lipiec@intel.com> Accept-Language: en-US, zh-CN Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 7ed38465-a446-4c44-d357-08da5260261d x-ms-traffictypediagnostic: DM8PR11MB5751:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: AKMP15ysxS8opVYn1cjqvn6UhFMBKfpoX13eWgxMKi4Zo/l970fmILFM0W9nqvLLPA1fp5lIX5Oeapb5gSr2hyD2gayQfmIf39LhTLx8ZrZz+y/x1C+dKpKCRLPFgnbzzt1SA7zbrCpOQ/6koEhwrUJaEx5W5LSU5lCdk+MfhrbsZQibMg4ZZJO2bIYR+PzUfJIwfm615yltZ1/U/igIfhxPeE4Jqkijv2X1pB43yZsHOv+oIMCEE3Gave0fMLCAvr/5DfDeGJg7QddYWZwgvCcC1T6KZeaRLgC3aFv+cfw1MHOn8wLSASSd9ESKirjvgaw40+PiXaYRFXVgyjBNXgGP2527K51Apppa1SA8niHnb2bGQWaKqbNJK2Q7E+NKveCVr4RJYja6z4lvLEzDu5j9llUUH4ko82esxhe3/O0DxLzmnJ9uNBBWHRDkA+PA4hEkPnJwYDQWhoIe0fNLh/3y+/v9ZxaPkn+e2K9k6SveDB4Lw8aCvMkT+5ypMOe2cYZakKRjB7hmVxVLsa1hX9mQQRfxeqZuWLQeEtsbMzNAC61LCvT2sLaobJEcNKzILXtY0KiiH6EYx8cAtLTXAJvx2JgsTMKxkyET5HJKuQz7KBDlb0k5vLgZSZykBem6kvXtfJd9uqexZx+n3cVyt/41HHgxPAIfA0YHa7Wx8eJmMwxF5VdhkXY9FweaREehEScysvV5e6ZqKsVBtf3HMw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB3504.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(366004)(55016003)(8936002)(9686003)(122000001)(52536014)(82960400001)(316002)(498600001)(110136005)(53546011)(33656002)(186003)(86362001)(38070700005)(83380400001)(38100700002)(66946007)(66476007)(66556008)(7696005)(66446008)(71200400001)(4326008)(5660300002)(64756008)(2906002)(15650500001)(8676002)(6636002)(76116006)(6506007)(26005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?SszZV1rM5lQNCAGin7Zz5q4jUTy7vlDBSlcmNWbWS1OUBto0GiUn1W7vYyb+?= =?us-ascii?Q?ce1TiHlR39TXHylS85AsloTmTS/cO6+uQ+WR3iDig2uTAe5tiasdrm2NlT2P?= =?us-ascii?Q?QLIuoGBIFkW/mdWOVT0BRuPzeHNcBijDOOfZ1FRp3rIj0Jm2goruXnX/lrBg?= =?us-ascii?Q?CjsAtiNolI4mN48Nl/xklp7yU8UUQyGFeAKjKef1yVLVFEIts/qzL83UzuSj?= =?us-ascii?Q?SvGecOJS7IJbZsSzTASEAo1UpNu8DD0GiT+F8BGbrzmy74dwZMvXSV0SH4Np?= =?us-ascii?Q?96zgNovrUGnuaz3/+fh0PfiU5z/nSdn2KYCOMe89OXgDHSgnm7hRleSW89G2?= =?us-ascii?Q?n5Xox/wUuM994iQQs9RK+YYoOOF8VhGAzq+gYJdawC8rWHPWtTF5sJC2yKkf?= =?us-ascii?Q?vdvcC//SqyeFeyNQcdgbSIOyi6u7tn+bSvxI+luUwZaN7GB2qLK2+0LIq95x?= =?us-ascii?Q?8Q8EJg85Xvf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Mer6p0952k7+?= =?us-ascii?Q?q1jal1Ry3Cg0XseLBb7cPpvQn4cSdPDiPwU3q9x2Iy2pJ5+1dCZLmcKIGVYB?= =?us-ascii?Q?pf+XV/kRUZvQ5I668vsRrtaGCTty7FLyHFolps8vIsea40QPzuRZso+khxiy?= =?us-ascii?Q?PSKTBSN+iA9FT9vJVj6fZTOgue9NnvZimyQwinLDBgUvqL160bdg47DIck/v?= =?us-ascii?Q?qitvTGRA1SZsGQWea60AqyqTYf5ZN5l2kCoEIByNqM5COCo3zoE1CXsa56lG?= =?us-ascii?Q?F79iZOfeE/ekTKe+T6ngNsxe7XuBXYrX99e7vjRPL68M9sVLy+McqVnxvO6u?= =?us-ascii?Q?mbj00EUp5DgVM6u8XrKfgMhlmxHvu6OJ0q0MmTlqZi9kMzSKWl824eSmVjNd?= =?us-ascii?Q?/zHl5276KA=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB3504.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7ed38465-a446-4c44-d357-08da5260261d X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Jun 2022 01:56:53.5704 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ImSZjXz0/HD90jIJv8TamMikjZwKa5y8oFPJQD8E7q/YaR0EDkI/YqA0/jLjAn5leZLkwwal1bJ4w0yx7SyF4Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM8PR11MB5751 X-OriginatorOrg: intel.com 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 Hi Herakliusz, Thanks for the clean-up! Comments inline. > -----Original Message----- > From: Lipiec, Herakliusz > Sent: Tuesday, June 7, 2022 7:49 PM > To: maxime.coquelin@redhat.com; Xia, Chenbo ; > Richardson, Bruce > Cc: dev@dpdk.org; Lipiec, Herakliusz > Subject: [PATCH 2/3] doc: update vhost sample app docs >=20 > Vhost sample app documentation describes parameters that are not in the > code and ommits parameters that exist. Also switching the order of Omits? > sections on running vhost and VM, since the --client parameter in the > sample line requires a socket to be created by VM. Removing uio > references and updating with vfio-pci. Finally aligining app Aligning? > name to the binary output by the meson build system. >=20 > Signed-off-by: Herakliusz Lipiec > --- > doc/guides/sample_app_ug/vhost.rst | 73 ++++++++++++++++-------------- > 1 file changed, 38 insertions(+), 35 deletions(-) >=20 > diff --git a/doc/guides/sample_app_ug/vhost.rst > b/doc/guides/sample_app_ug/vhost.rst > index a6ce4bc8ac..298fa90a83 100644 > --- a/doc/guides/sample_app_ug/vhost.rst > +++ b/doc/guides/sample_app_ug/vhost.rst > @@ -17,10 +17,10 @@ Testing steps > ------------- >=20 > This section shows the steps how to test a typical PVP case with this > -vhost-switch sample, whereas packets are received from the physical NIC > +dpdk-vhost sample, whereas packets are received from the physical NIC > port first and enqueued to the VM's Rx queue. Through the guest testpmd'= s > default forwarding mode (io forward), those packets will be put into > -the Tx queue. The vhost-switch example, in turn, gets the packets and > +the Tx queue. The dpdk-vhost example, in turn, gets the packets and > puts back to the same physical NIC port. >=20 > Build > @@ -33,18 +33,6 @@ The application is located in the ``vhost`` sub- > directory. > .. note:: > In this example, you need build DPDK both on the host and inside gues= t. >=20 > -Start the vswitch example > -~~~~~~~~~~~~~~~~~~~~~~~~~ > - > -.. code-block:: console > - > - ./dpdk-vhost-switch -l 0-3 -n 4 --socket-mem 1024 \ > - -- --socket-file /tmp/sock0 --client \ > - ... > - > -Check the `Parameters`_ section for the explanations on what do those > -parameters mean. > - > .. _vhost_app_run_vm: >=20 > Start the VM > @@ -66,6 +54,19 @@ Start the VM > some specific features, a higher version might be need. Such as > QEMU 2.7 (or above) for the reconnect feature. >=20 > + > +Start the vswitch example > +~~~~~~~~~~~~~~~~~~~~~~~~~ > + > +.. code-block:: console > + > + ./dpdk-vhost -l 0-3 -n 4 --socket-mem 1024 \ > + -- --socket-file /tmp/sock0 --client \ > + ... > + > +Check the `Parameters`_ section for the explanations on what do those > +parameters mean. > + > .. _vhost_app_run_dpdk_inside_guest: >=20 > Run testpmd inside guest > @@ -77,8 +78,8 @@ could be done by: >=20 > .. code-block:: console >=20 > - modprobe uio_pci_generic > - dpdk/usertools/dpdk-devbind.py -b uio_pci_generic 0000:00:04.0 > + modprobe vfio-pci > + dpdk/usertools/dpdk-devbind.py -b vfio-pci 0000:00:04.0 >=20 > Then start testpmd for packet forwarding testing. >=20 > @@ -87,13 +88,16 @@ Then start testpmd for packet forwarding testing. > .//app/dpdk-testpmd -l 0-1 -- -i > > start tx_first >=20 > +For more information about vIOMMU and NO-IOMMU and VFIO please refer to > +:doc:`/../linux_gsg/linux_drivers` section of the DPDK Getting started > guide. > + Good note. This also makes me realize the no-iommu section there does not work for latest kernel now. May need a patch later.=20 > Inject packets > -------------- >=20 > -While a virtio-net is connected to vhost-switch, a VLAN tag starts with > +While a virtio-net is connected to dpdk-vhost, a VLAN tag starts with > 1000 is assigned to it. So make sure configure your packet generator > with the right MAC and VLAN tag, you should be able to see following > -log from the vhost-switch console. It means you get it work:: > +log from the dpdk-vhost console. It means you get it work:: >=20 > VHOST_DATA: (0) mac 52:54:00:00:00:14 and vlan 1000 registered >=20 > @@ -146,26 +150,10 @@ The rx-retry-delay option specifies the timeout (in > micro seconds) between > retries on an RX burst, it takes effect only when rx retry is enabled. > The > default value is 15. >=20 > -**--dequeue-zero-copy** > -Dequeue zero copy will be enabled when this option is given. it is worth > to > -note that if NIC is bound to driver with iommu enabled, dequeue zero cop= y > -cannot work at VM2NIC mode (vm2vm=3D0) due to currently we don't setup > iommu > -dma mapping for guest memory. > - > -**--vlan-strip 0|1** > -VLAN strip option is removed, because different NICs have different > behaviors > -when disabling VLAN strip. Such feature, which heavily depends on > hardware, > -should be removed from this example to reduce confusion. Now, VLAN strip > is > -enabled and cannot be disabled. > - > **--builtin-net-driver** > A very simple vhost-user net driver which demonstrates how to use the > generic > vhost APIs will be used when this option is given. It is disabled by > default. >=20 > -**--dma-type** > -This parameter is used to specify DMA type for async vhost-user net > driver which > -demonstrates how to use the async vhost APIs. It's used in combination > with dmas. > - > **--dmas** > This parameter is used to specify the assigned DMA device of a vhost > device. > Async vhost-user net driver will be used if --dmas is set. For example > @@ -173,6 +161,20 @@ Async vhost-user net driver will be used if --dmas i= s > set. For example > device 0 enqueue operation and use DMA channel 00:04.1 for vhost device = 1 > enqueue operation. >=20 > +**--total-num-mbufs 0-N** > +This parameter sets the number of mbufs to be allocated in mbuf pools, > +the default value is 147456. This is can be used if launch of a port > fails > +due to shortage of mbufs. > + > +**--tso 0|1** > +Disables/enables TCP segment offload. > + > +**--tx-csum 0|1** > +Disables/enables TX checksum offload. > + > +**-p mask** > +Number of ports to use. This should be described as 'Port mask which specifies the ports to be used= ' Thanks, Chenbo > + > Common Issues > ------------- >=20 > @@ -201,7 +203,8 @@ Common Issues >=20 > mbuf pool size is dependent on the MAX_QUEUES configuration, if NIC's > max queue number is larger than 128, device start will fail due to > - insufficient mbuf. > + insufficient mbuf. This can be adjusted using ``--total-num-mbufs`` > + parameter. >=20 > * Option "builtin-net-driver" is incompatible with QEMU >=20 > -- > 2.36.1