Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754630AbdGNN1m (ORCPT ); Fri, 14 Jul 2017 09:27:42 -0400 Received: from mail-wr0-f178.google.com ([209.85.128.178]:32835 "EHLO mail-wr0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754544AbdGNN1f (ORCPT ); Fri, 14 Jul 2017 09:27:35 -0400 MIME-Version: 1.0 In-Reply-To: <20170712000402.GA27718@localhost.localdomain> References: <1499763313-7214-1-git-send-email-suganath-prabu.subramani@broadcom.com> <1499763313-7214-3-git-send-email-suganath-prabu.subramani@broadcom.com> <20170712000402.GA27718@localhost.localdomain> From: Suganath Prabu Subramani Date: Fri, 14 Jul 2017 18:57:33 +0530 Message-ID: Subject: Re: [PATCH 02/13] mpt3sas: SGL to PRP Translation for I/Os to NVMe devices To: Keith Busch Cc: "JBottomley@Parallels.com" , "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" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1603 Lines: 43 Hi Keith, We have made change and submitted V2 of patch set. Thanks, Suganath Prabu S On Wed, Jul 12, 2017 at 5:34 AM, Keith Busch wrote: > On Tue, Jul 11, 2017 at 01:55:02AM -0700, Suganath Prabu S wrote: >> +/** >> + * _base_check_pcie_native_sgl - This function is called for PCIe end devices to >> + * determine if the driver needs to build a native SGL. If so, that native >> + * SGL is built in the special contiguous buffers allocated especially for >> + * PCIe SGL creation. If the driver will not build a native SGL, return >> + * TRUE and a normal IEEE SGL will be built. Currently this routine >> + * supports NVMe. >> + * @ioc: per adapter object >> + * @mpi_request: mf request pointer >> + * @smid: system request message index >> + * @scmd: scsi command >> + * @pcie_device: points to the PCIe device's info >> + * >> + * Returns 0 if native SGL was built, 1 if no SGL was built >> + */ >> +static int >> +_base_check_pcie_native_sgl(struct MPT3SAS_ADAPTER *ioc, >> + Mpi25SCSIIORequest_t *mpi_request, u16 smid, struct scsi_cmnd *scmd, >> + struct _pcie_device *pcie_device) >> +{ > > > >> + /* Return 0, indicating we built a native SGL. */ >> + return 1; >> +} > > This function doesn't return 0 ever. Not sure why it's here. > > Curious about your device, though, if a nvme native SGL can *not* be > built, does the HBA firmware then buffer it in its local memory before > sending/receiving to/from the host? > > And if a native SGL can be built, does the NVMe target DMA directly > to/from host memory, giving a performance boost?