From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 91E4DA0561; Mon, 20 Apr 2020 19:12:36 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7371F1D6DC; Mon, 20 Apr 2020 19:12:36 +0200 (CEST) Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by dpdk.org (Postfix) with ESMTP id 13E141D6CA for ; Mon, 20 Apr 2020 19:12:35 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 83EF230D; Mon, 20 Apr 2020 13:12:30 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Mon, 20 Apr 2020 13:12:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm1; bh= aA65aTwqnDYj8hNuuxLTzt8ZxB0cDPx4k3FwWrwD5Vw=; b=tX7xtLF8ODnUkPxC cKZNNqGP08Tm24tRIAQ4Y/gaktqZU0M/2AwBQJvPpZbc/NcGDFNqWo1RPAe0XDEa 2QOSfOUnByVS/Tycllj/w5Reo8Ncl0XVAbpd2hpfwR5G/wiXpqiejQHQAAYui2wd /7DL0kMIZNQkJHj4IsV4h0PaSiYo9xQT7j3aeiErDcElNrKkf2ZB0OpYyuWLryYL K4aF8LQGRWddjIXQw2gG/jVbcK0rOcP2XSwGBPn16EjAXjP1D4nah/biKBMcvnmi uUfFAV1YyqMzFpH9GPgGwc71nHxfhRGMFBzQzHQo8yIw6S9wr5Eo+yOfULVF3rtC cEWVhA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=aA65aTwqnDYj8hNuuxLTzt8ZxB0cDPx4k3FwWrwD5 Vw=; b=vpwFa5Bo2MwBnvPshvLULousyjcSDOo5sxZQjKG28PteSPc2jHvu8Ntv/ 6aD/GtiykqHSW9bmp/3PG929NLjEiRWH+UEKGiLp9F74ymBR6YCd4mtPNPReBHoC x1AZOCDM5v7kPRLm5C4Mded2RD2dVv+HLqWLE7ThbXm9WsQgXOm531a5Utrg0YTC 7BLSP9IhFlG5GstIuXgwv/eBTxlD0JqT9zZZaJOrklPlYfGsf20GPmJTFlr2ump1 19HqWe4+TMlwdCUKK45Pwp4Xlyx3LPesQ7SWzPoNKDQWCz6dpvOSRUMvhlgMrRTL 1Zf6FHA7Aji8i0jzwmFJnz2au9rXg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrgeefgddutdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecukf hppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghrufhiiigvpedtnecurfgr rhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id BFF703280066; Mon, 20 Apr 2020 13:12:27 -0400 (EDT) From: Thomas Monjalon To: Haiyue Wang Cc: dev@dpdk.org, anatoly.burakov@intel.com, vattunuru@marvell.com, jerinj@marvell.com, alex.williamson@redhat.com, david.marchand@redhat.com, john.mcnamara@intel.com Date: Mon, 20 Apr 2020 19:12:26 +0200 Message-ID: <3366363.CEsMmvUzM0@thomas> In-Reply-To: <20200418173035.8000-3-haiyue.wang@intel.com> References: <20200305043311.17065-1-vattunuru@marvell.com> <20200418173035.8000-1-haiyue.wang@intel.com> <20200418173035.8000-3-haiyue.wang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v8 2/2] eal: support for VFIO-PCI VF token X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi, A general comment, please try to limit line length (80 is a good limit), and prefer breaking lines after a punctuation sign. Try shortening sentences as well. I would love seeing some documentation reviews from english native speakers. 18/04/2020 19:30, Haiyue Wang: > --- a/doc/guides/linux_gsg/linux_drivers.rst > +++ b/doc/guides/linux_gsg/linux_drivers.rst > +The ``vfio-pci`` module since Linux version 5.7 supports the creation of virtual functions, this feature is disabled > +by default. When enabled, the PF needs a shared VF token (UUID) to setup the trust between SR-IOV PF and VFs. The VF > +token is any kind of valid UUID value selected by the user. When the PF device is bound to ``vfio-pci`` module, it should > +not have any VFs created, this is consistent as before for security reason. > + > +Some use cases about how to use the VF token: > + > + - The user just uses PF only for DPDK, then no VF token is required to start the PF device. This use case is not using the token, so it should be mentioned out of this list. > + > + - The user wants to creat SR-IOV VFs on the PF device which is bound to ``vfio-pci`` module, then the user needs to select creat -> create > + a valid UUID type VF token to start the PF device; after the VFs are created, this VF token is also required to access each > + VF device. > + > + - If the DPDK application that runs on PF device exits, and the user wants to start it with another different VF token > + value, it will be OK if no application (DPDP or KVM) runs on VF, otherwise, it will fail to start with a kernel message DPDP -> DPDK. > + "[19145.688094] vfio-pci 0000:87:00.0: Incorrect VF token provided for device" shown. When all of the VFs are free, the The timestamp is useless in the log. Please insert the log after :: as a fixed-size font line. > + user can select a new VF token to start the PF device. > + > +The VFs created are bound to ``vfio-pci`` module automatically. DPDK will use the keyword ``vf_token`` as the device argument > +to pass the VF token value to PF and its related VFs, the PMD should not use it, and this argument will be pruned from the > +device argument list, so the PMD can parse its own valid device arguments successfully without seeing it. > + > +.. code-block:: console > + > + 1. sudo modprobe vfio-pci enable_sriov=1 > + > + 2. ./usertools/dpdk-devbind.py -b vfio-pci 0000:87:00.0 > + > + 3. echo 2 > /sys/bus/pci/devices/0000:87:00.0/sriov_numvfs > + > + 4. Start the PF: > + ./x86_64-native-linux-gcc/app/testpmd -l 22-25 -n 4 -w 87:00.0,vf_token=2ab74924-c335-45f4-9b16-8569e5b08258 --file-prefix=pf -- -i How did you generate this token? > + > + 5. Start the VF: > + ./x86_64-native-linux-gcc/app/testpmd -l 26-29 -n 4 -w 87:02.0,vf_token=2ab74924-c335-45f4-9b16-8569e5b08258 --file-prefix=vf0 -- -i Please do not make bullets and comments part of code-block.