Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751714AbdG0N1g (ORCPT ); Thu, 27 Jul 2017 09:27:36 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:28668 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751662AbdG0N1f (ORCPT ); Thu, 27 Jul 2017 09:27:35 -0400 To: Suganath Prabu S Cc: jejb@kernel.org, hch@infradead.org, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, Sathya.Prakash@broadcom.com, kashyap.desai@broadcom.com, linux-kernel@vger.kernel.org, chaitra.basappa@broadcom.com, sreekanth.reddy@broadcom.com, linux-nvme@lists.infradead.org Subject: Re: [PATCH v2 03/13] mpt3sas: SGL to PRP Translation for I/Os to NVMe devices From: "Martin K. Petersen" Organization: Oracle Corporation References: <1500038560-11231-1-git-send-email-suganath-prabu.subramani@broadcom.com> <1500038560-11231-4-git-send-email-suganath-prabu.subramani@broadcom.com> Date: Thu, 27 Jul 2017 09:26:32 -0400 In-Reply-To: <1500038560-11231-4-git-send-email-suganath-prabu.subramani@broadcom.com> (Suganath Prabu S.'s message of "Fri, 14 Jul 2017 18:52:30 +0530") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Source-IP: userv0021.oracle.com [156.151.31.71] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 505 Lines: 15 Suganath, > * Added support for translating the SGLs associated with incoming > commands either to IEE SGL or NVMe PRPs for NVMe devices. This all seems very convoluted. You should rely on the block layer infrastructure instead of doing all this slicing and dicing by hand. If the attached device is an NVMe drive, call blk_queue_virt_boundary() and you will only receive requests that are suitable for a device with PRP-style scatterlist constraints. -- Martin K. Petersen Oracle Linux Engineering