Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sagi Grimberg <sagi@grimberg.me>
To: Max Gurtovoy <maxg@mellanox.com>,
	jgg@mellanox.com, linux-nvme@lists.infradead.org, hch@lst.de,
	kbusch@kernel.org, Chaitanya.Kulkarni@wdc.com
Cc: krishna2@chelsio.com, bharat@chelsio.com, nirranjan@chelsio.com,
	bvanassche@acm.org
Subject: Re: [PATCH V2 2/3] nvmet-rdma: Implement get_mdts controller op
Date: Thu, 5 Mar 2020 12:44:43 -0800	[thread overview]
Message-ID: <468c65e9-a74a-ba83-9b2b-e372b5bb61ab@grimberg.me> (raw)
In-Reply-To: <20200305095530.132858-2-maxg@mellanox.com>



On 3/5/20 1:55 AM, Max Gurtovoy wrote:
> Set the maximal data transfer size to be 1MB (currently mdts is
> unlimited). This will allow calculating the amount of MR's that
> one ctrl should allocate to fulfill it's capabilities.
> 
> Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
> ---
> 
> changes from V1:
>   - renamed nvmet_rdma_set_mdts to nvmet_rdma_get_mdts
>   - align to get_mdts callback changes
> 
> ---
>   drivers/nvme/target/rdma.c | 8 ++++++++
>   1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/nvme/target/rdma.c b/drivers/nvme/target/rdma.c
> index 37d262a..d12ef0d 100644
> --- a/drivers/nvme/target/rdma.c
> +++ b/drivers/nvme/target/rdma.c
> @@ -30,6 +30,7 @@
>   #define NVMET_RDMA_DEFAULT_INLINE_DATA_SIZE	PAGE_SIZE
>   #define NVMET_RDMA_MAX_INLINE_SGE		4
>   #define NVMET_RDMA_MAX_INLINE_DATA_SIZE		max_t(int, SZ_16K, PAGE_SIZE)
> +#define NVMET_RDMA_MAX_MDTS			8
>   
>   struct nvmet_rdma_cmd {
>   	struct ib_sge		sge[NVMET_RDMA_MAX_INLINE_SGE + 1];
> @@ -1602,6 +1603,12 @@ static void nvmet_rdma_disc_port_addr(struct nvmet_req *req,
>   	}
>   }
>   
> +static u8 nvmet_rdma_get_mdts(const struct nvmet_ctrl *ctrl)
> +{
> +	/* Assume mpsmin == device_page_size == 4KB */

This comment should come at the define entry.

> +	return NVMET_RDMA_MAX_MDTS;
> +}
> +
>   static const struct nvmet_fabrics_ops nvmet_rdma_ops = {
>   	.owner			= THIS_MODULE,
>   	.type			= NVMF_TRTYPE_RDMA,
> @@ -1612,6 +1619,7 @@ static void nvmet_rdma_disc_port_addr(struct nvmet_req *req,
>   	.queue_response		= nvmet_rdma_queue_response,
>   	.delete_ctrl		= nvmet_rdma_delete_ctrl,
>   	.disc_traddr		= nvmet_rdma_disc_port_addr,
> +	.get_mdts		= nvmet_rdma_get_mdts,
>   };
>   
>   static void nvmet_rdma_remove_one(struct ib_device *ib_device, void *client_data)
> 

_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

  reply	other threads:[~2020-03-05 20:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-05  9:55 [PATCH V2 1/3] nvmet: Add get_mdts op for controllers Max Gurtovoy
2020-03-05  9:55 ` [PATCH V2 2/3] nvmet-rdma: Implement get_mdts controller op Max Gurtovoy
2020-03-05 20:44   ` Sagi Grimberg [this message]
2020-03-05 23:01     ` Max Gurtovoy
2020-03-05  9:55 ` [PATCH V2 3/3] nvmet-rdma: allocate RW ctxs according to mdts Max Gurtovoy
2020-03-05 20:49   ` Sagi Grimberg
2020-03-05 22:59     ` Max Gurtovoy
2020-03-06  1:19       ` Sagi Grimberg
2020-03-05 20:40 ` [PATCH V2 1/3] nvmet: Add get_mdts op for controllers Sagi Grimberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=468c65e9-a74a-ba83-9b2b-e372b5bb61ab@grimberg.me \
    --to=sagi@grimberg.me \
    --cc=Chaitanya.Kulkarni@wdc.com \
    --cc=bharat@chelsio.com \
    --cc=bvanassche@acm.org \
    --cc=hch@lst.de \
    --cc=jgg@mellanox.com \
    --cc=kbusch@kernel.org \
    --cc=krishna2@chelsio.com \
    --cc=linux-nvme@lists.infradead.org \
    --cc=maxg@mellanox.com \
    --cc=nirranjan@chelsio.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox