From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ale.deltatee.com (ale.deltatee.com [207.54.116.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 300002110BD65 for ; Fri, 31 Aug 2018 08:42:22 -0700 (PDT) References: <20180830185352.3369-1-logang@deltatee.com> <20180830185352.3369-14-logang@deltatee.com> From: Logan Gunthorpe Message-ID: Date: Fri, 31 Aug 2018 09:41:51 -0600 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US Subject: Re: [PATCH v5 13/13] nvmet: Optionally use PCI P2P memory List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" To: Sagi Grimberg , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-nvme@lists.infradead.org, linux-rdma@vger.kernel.org, linux-nvdimm@lists.01.org, linux-block@vger.kernel.org Cc: =?UTF-8?Q?Christian_K=c3=b6nig?= , Benjamin Herrenschmidt , Steve Wise , Alex Williamson , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , Jason Gunthorpe , Bjorn Helgaas , Max Gurtovoy , Christoph Hellwig List-ID: Thanks, for the review. On 30/08/18 06:25 PM, Sagi Grimberg wrote: >> + if (req->port->p2p_dev) { >> + if (!pci_p2pdma_assign_provider(req->port->p2p_dev, >> + &ctrl->p2p_clients)) { >> + pr_info("peer-to-peer memory on %s is not supported\n", >> + pci_name(req->port->p2p_dev)); >> + goto free_devices; >> + } >> + ctrl->p2p_dev = pci_dev_get(req->port->p2p_dev); >> + } else { > > When is port->p2p_dev == NULL? a little more documentation would help > here... In the configfs functions, if the user enables p2p (port->use_p2pmem) using 'auto' or 'y' then port->p2p_dev will be NULL. If the user sets a specific p2p_dev to use, port->p2p_dev will be set to that device. I can add a couple comments in the next version. Logan _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ale.deltatee.com ([207.54.116.67]:46842 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727768AbeHaTu2 (ORCPT ); Fri, 31 Aug 2018 15:50:28 -0400 To: Sagi Grimberg , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-nvme@lists.infradead.org, linux-rdma@vger.kernel.org, linux-nvdimm@lists.01.org, linux-block@vger.kernel.org Cc: Stephen Bates , Christoph Hellwig , Keith Busch , Bjorn Helgaas , Jason Gunthorpe , Max Gurtovoy , Dan Williams , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , Benjamin Herrenschmidt , Alex Williamson , =?UTF-8?Q?Christian_K=c3=b6nig?= , Steve Wise References: <20180830185352.3369-1-logang@deltatee.com> <20180830185352.3369-14-logang@deltatee.com> From: Logan Gunthorpe Message-ID: Date: Fri, 31 Aug 2018 09:41:51 -0600 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Subject: Re: [PATCH v5 13/13] nvmet: Optionally use PCI P2P memory Sender: linux-block-owner@vger.kernel.org List-Id: linux-block@vger.kernel.org Thanks, for the review. On 30/08/18 06:25 PM, Sagi Grimberg wrote: >> + if (req->port->p2p_dev) { >> + if (!pci_p2pdma_assign_provider(req->port->p2p_dev, >> + &ctrl->p2p_clients)) { >> + pr_info("peer-to-peer memory on %s is not supported\n", >> + pci_name(req->port->p2p_dev)); >> + goto free_devices; >> + } >> + ctrl->p2p_dev = pci_dev_get(req->port->p2p_dev); >> + } else { > > When is port->p2p_dev == NULL? a little more documentation would help > here... In the configfs functions, if the user enables p2p (port->use_p2pmem) using 'auto' or 'y' then port->p2p_dev will be NULL. If the user sets a specific p2p_dev to use, port->p2p_dev will be set to that device. I can add a couple comments in the next version. Logan From mboxrd@z Thu Jan 1 00:00:00 1970 From: Logan Gunthorpe Subject: Re: [PATCH v5 13/13] nvmet: Optionally use PCI P2P memory Date: Fri, 31 Aug 2018 09:41:51 -0600 Message-ID: References: <20180830185352.3369-1-logang@deltatee.com> <20180830185352.3369-14-logang@deltatee.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org Sender: "Linux-nvdimm" To: Sagi Grimberg , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-nvme-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org, linux-block-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: =?UTF-8?Q?Christian_K=c3=b6nig?= , Benjamin Herrenschmidt , Steve Wise , Alex Williamson , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , Jason Gunthorpe , Bjorn Helgaas , Max Gurtovoy , Christoph Hellwig List-Id: linux-rdma@vger.kernel.org Thanks, for the review. On 30/08/18 06:25 PM, Sagi Grimberg wrote: >> + if (req->port->p2p_dev) { >> + if (!pci_p2pdma_assign_provider(req->port->p2p_dev, >> + &ctrl->p2p_clients)) { >> + pr_info("peer-to-peer memory on %s is not supported\n", >> + pci_name(req->port->p2p_dev)); >> + goto free_devices; >> + } >> + ctrl->p2p_dev = pci_dev_get(req->port->p2p_dev); >> + } else { > > When is port->p2p_dev == NULL? a little more documentation would help > here... In the configfs functions, if the user enables p2p (port->use_p2pmem) using 'auto' or 'y' then port->p2p_dev will be NULL. If the user sets a specific p2p_dev to use, port->p2p_dev will be set to that device. I can add a couple comments in the next version. Logan From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Return-Path: To: Sagi Grimberg , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-nvme@lists.infradead.org, linux-rdma@vger.kernel.org, linux-nvdimm@lists.01.org, linux-block@vger.kernel.org References: <20180830185352.3369-1-logang@deltatee.com> <20180830185352.3369-14-logang@deltatee.com> From: Logan Gunthorpe Message-ID: Date: Fri, 31 Aug 2018 09:41:51 -0600 MIME-Version: 1.0 In-Reply-To: Subject: Re: [PATCH v5 13/13] nvmet: Optionally use PCI P2P memory List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?Q?Christian_K=c3=b6nig?= , Benjamin Herrenschmidt , Steve Wise , Alex Williamson , Stephen Bates , Keith Busch , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , Jason Gunthorpe , Bjorn Helgaas , Max Gurtovoy , Dan Williams , Christoph Hellwig Content-Type: text/plain; charset="us-ascii" Sender: "Linux-nvme" Errors-To: linux-nvme-bounces+bjorn=helgaas.com@lists.infradead.org List-ID: Thanks, for the review. On 30/08/18 06:25 PM, Sagi Grimberg wrote: >> + if (req->port->p2p_dev) { >> + if (!pci_p2pdma_assign_provider(req->port->p2p_dev, >> + &ctrl->p2p_clients)) { >> + pr_info("peer-to-peer memory on %s is not supported\n", >> + pci_name(req->port->p2p_dev)); >> + goto free_devices; >> + } >> + ctrl->p2p_dev = pci_dev_get(req->port->p2p_dev); >> + } else { > > When is port->p2p_dev == NULL? a little more documentation would help > here... In the configfs functions, if the user enables p2p (port->use_p2pmem) using 'auto' or 'y' then port->p2p_dev will be NULL. If the user sets a specific p2p_dev to use, port->p2p_dev will be set to that device. I can add a couple comments in the next version. Logan _______________________________________________ Linux-nvme mailing list Linux-nvme@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-nvme From mboxrd@z Thu Jan 1 00:00:00 1970 From: logang@deltatee.com (Logan Gunthorpe) Date: Fri, 31 Aug 2018 09:41:51 -0600 Subject: [PATCH v5 13/13] nvmet: Optionally use PCI P2P memory In-Reply-To: References: <20180830185352.3369-1-logang@deltatee.com> <20180830185352.3369-14-logang@deltatee.com> Message-ID: Thanks, for the review. On 30/08/18 06:25 PM, Sagi Grimberg wrote: >> + if (req->port->p2p_dev) { >> + if (!pci_p2pdma_assign_provider(req->port->p2p_dev, >> + &ctrl->p2p_clients)) { >> + pr_info("peer-to-peer memory on %s is not supported\n", >> + pci_name(req->port->p2p_dev)); >> + goto free_devices; >> + } >> + ctrl->p2p_dev = pci_dev_get(req->port->p2p_dev); >> + } else { > > When is port->p2p_dev == NULL? a little more documentation would help > here... In the configfs functions, if the user enables p2p (port->use_p2pmem) using 'auto' or 'y' then port->p2p_dev will be NULL. If the user sets a specific p2p_dev to use, port->p2p_dev will be set to that device. I can add a couple comments in the next version. Logan