From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f180.google.com (mail-pf0-f180.google.com [209.85.192.180]) by dpdk.org (Postfix) with ESMTP id 18C712C8 for ; Fri, 7 Jul 2017 02:50:42 +0200 (CEST) Received: by mail-pf0-f180.google.com with SMTP id c73so8793403pfk.2 for ; Thu, 06 Jul 2017 17:50:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=CGQTU5jQ5dla+0VJhP9mmHqK8HZ/+zH6aQ3YGwBfnJ4=; b=AUZG+dJUgb7pWWw4c2yBJdP4u4/ZNdnW1GDov21jQx/u1Dj5VtJ01qoEb/ltsCwsyr Xgf8e+vwM5Ge5vCQnKUNeTW3OtOYQ3XrK9bBh42q3VAliPy7MzxJb5d++bByV4n81Hnu +9ny0CxM+eMUb5EyGHhhE9vXHfnuSNrcpniInWQ92/Jqc7plYLGTtcvOIlt+LNgXm/uJ L6MMoE/Lsuxl1vFh4Zx6h2h3B6XffBuWwr1yYpW8MK8QTcDbI5zNTvsZKv7+39HbFl0B ISZ2G3pY/zpBvzoSBdZ58Hknajk7I6ukFkOw+I4Txm5CpVAEiwVw09DgKkz5pkWqMz3Q jQuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=CGQTU5jQ5dla+0VJhP9mmHqK8HZ/+zH6aQ3YGwBfnJ4=; b=iTcQTrV1NtyPki+iYZUZrjdQ/gUPc3PrtnxOraPGvRVXbAA7+Bz7xLwKdFJaSS4eBF orNCOnwa9AMwi5fL+n0MBZHV8Uh6B0mvtW0zaI+267Uuedvqb1tUoHzeoNl+06QetL9F S10Gsqf1dr90MH6A2wSA3nd/eH81Inrc7+nBWGl4z8zLOa3GpZ/o/1wHx9v+yXXQUUzK eakF7CUokWCZc7oc3aHRxLLnG/n8748r7hYz4aT+39WipSFhVK+RvJt/k2qklyAEddzz s2dTUSS8E4j7ZVqh1ZKG1Uv8f0zQDvRFrU4VHpKIVNmUvyIwsAHrf4q5qYXAYBj7Zkza 8Fzw== X-Gm-Message-State: AIVw113Gzk+7Zr9bCom51DRDReG7diONXfa2zinJdrHZ2BlG9B9ziTfK qtJ+hC9VjtE3VFPGmfVBEQ== X-Received: by 10.84.232.207 with SMTP id x15mr32107825plm.173.1499388641955; Thu, 06 Jul 2017 17:50:41 -0700 (PDT) Received: from yliu-home ([45.63.61.64]) by smtp.gmail.com with ESMTPSA id h123sm2122268pgc.36.2017.07.06.17.50.39 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 06 Jul 2017 17:50:40 -0700 (PDT) Date: Fri, 7 Jul 2017 08:50:35 +0800 From: Yuanhan Liu To: Changpeng Liu Cc: dev@dpdk.org Message-ID: <20170707005035.GT11626@yliu-home> References: <1498728512-12728-1-git-send-email-changpeng.liu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1498728512-12728-1-git-send-email-changpeng.liu@intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) Subject: Re: [dpdk-dev] [PATCH] examples/vhost: introduce a new vhost-user-scsi sample application 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: , X-List-Received-Date: Fri, 07 Jul 2017 00:50:43 -0000 On Thu, Jun 29, 2017 at 05:28:32PM +0800, Changpeng Liu wrote: > +.. note:: > + You must check whether you Qemu can support "vhost-user-scsi" or not, > + the latest Qemu code is recommended. You should specify the least QEMU version that supports vhost-user scsi here. > + > +Common Issues > +------------- > + > +* QEMU fails to allocate memory on hugetlbfs, with an error like the > + following:: > + > + file_ram_alloc: can't mmap RAM pages: Cannot allocate memory > + > + When running QEMU the above error indicates that it has failed to allocate > + memory for the Virtual Machine on the hugetlbfs. This is typically due to > + insufficient hugepages being free to support the allocation request. The > + number of free hugepages can be checked as follows: > + > + .. code-block:: console > + > + cat /sys/kernel/mm/hugepages/hugepages-/nr_hugepages > + > + The command above indicates how many hugepages are free to support QEMU's > + allocation request. > + > +* vhost-user will not work with a QEMU version without shared memory mapping: > + > + Make sure ``share=on`` QEMU option is given. They are common pitfalls of vhost-user examples. You don't have to repeat it again here. Instead, you could add a link to the vhost-example doc and let this section only cover issues belong to vhost-user scsi. > +* vhost_scsi can not start with block size 512 Bytes: > + > + Currently DPDK vhost library was designed for NET device(althrough the APIs > + are generic now), for 512 Bytes block device, Qemu BIOS(x86 BIOS Enhanced > + Disk Device) will enumerate all block device and do some IO to those block > + devices with 512 Bytes sector size. DPDK vhost library can not process such > + scenarios(both BIOS and OS will enumerate the block device), so as a > + workaround, the vhost_scsi example application hardcoded the block size > + with 512 Bytes. A bit confused here. You said we can not use 512 bytes while you hardcode it with 512 bytes? > +static void > +scsi_task_build_sense_data(struct vhost_scsi_task *task, int sk, > + int asc, int ascq) > +{ > + uint8_t *cp; > + int resp_code; > + > + resp_code = 0x70; /* Current + Fixed format */ Could you add macros for those magic numbers? I saw quite a lot of them. BTW, you might want to build it on a 32bit system. I think this patch won't build successfully on it. --yliu