All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Smart <james.smart@broadcom.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-nvme@lists.infradead.org, linux-scsi@vger.kernel.org
Subject: Re: [PATCH 3/5] nvme-fabrics: Add host FC transport support
Date: Mon, 22 Aug 2016 10:24:39 -0700	[thread overview]
Message-ID: <892d8974-2fc9-7fac-fda5-b7c628b17906@broadcom.com> (raw)
In-Reply-To: <20160811211652.GF18013@infradead.org>


> Are you going to send a FC support patch for nvme-cli as well?

I will, but concentrating on core support for now. I expect a fair 
number of things need to be done in the cli.


>
>> +	assoc_rqst->assoc_cmd.ersp_ratio = cpu_to_be16(ersp_ratio);
>> +	assoc_rqst->assoc_cmd.sqsize = cpu_to_be16(qsize);
>> +	/* TODO:
>> +	 * assoc_rqst->assoc_cmd.cntlid = cpu_to_be16(?);
>> +	 * strncpy(assoc_rqst->assoc_cmd.hostid, ?,
>> +	 *	min(FCNVME_ASSOC_HOSTID_LEN, NVMF_NQN_SIZE));
>> +	 * strncpy(assoc_rqst->assoc_cmd.hostnqn, ?,
>> +	 *	min(FCNVME_ASSOC_HOSTNQN_LEN, NVMF_NQN_SIZE];
>> +	 */
> What is the problem with filling all these out based on the information
> in the nvme_host structure?

Well, I want to get them from the same place that the fabrics routines 
do when they build a capsule. So they should come from the opts struct. 
It's missing the controller id, so I'll need to address that.


>
> This probably needs to be moved, similar to the patch Sagi just
> did for RDMA.  In general it might be a good idea to look at the
> various recent RDMA changes and check if they need to be brought over.

yeah - I typically do a resync every time I repost.


>
>> +	/*
>> +	 * TODO: blk_integrity_rq(rq)  for DIX
>> +	 */
> We'll hopefully be able to just move the DIX handling to common code.
> Any help appreciated..

Yes and no....    and likely a separate discussion.  If DIF is passed, 
you should involve the host port to validate on egress as well has what 
the target controller will do. Although it brings up some headaches if 
the host detects an error (e.g. protocol requires target to be part of 
it).  If DIF is inserted, the question will be whether you want to 
insert DIF at the egress point of the host port or do you pass it over 
the fabric w/o dif and have the tgt controller insert it.  I assume 
we'll need to talk more.

>
> This seems to miss reference counting on the lport and rport structure.
yes - an area of weakness right now.

> It would be good to sort this out before merging. 

I'll make a pass at it.

-- james



WARNING: multiple messages have this Message-ID (diff)
From: james.smart@broadcom.com (James Smart)
Subject: [PATCH 3/5] nvme-fabrics: Add host FC transport support
Date: Mon, 22 Aug 2016 10:24:39 -0700	[thread overview]
Message-ID: <892d8974-2fc9-7fac-fda5-b7c628b17906@broadcom.com> (raw)
In-Reply-To: <20160811211652.GF18013@infradead.org>


> Are you going to send a FC support patch for nvme-cli as well?

I will, but concentrating on core support for now. I expect a fair 
number of things need to be done in the cli.


>
>> +	assoc_rqst->assoc_cmd.ersp_ratio = cpu_to_be16(ersp_ratio);
>> +	assoc_rqst->assoc_cmd.sqsize = cpu_to_be16(qsize);
>> +	/* TODO:
>> +	 * assoc_rqst->assoc_cmd.cntlid = cpu_to_be16(?);
>> +	 * strncpy(assoc_rqst->assoc_cmd.hostid, ?,
>> +	 *	min(FCNVME_ASSOC_HOSTID_LEN, NVMF_NQN_SIZE));
>> +	 * strncpy(assoc_rqst->assoc_cmd.hostnqn, ?,
>> +	 *	min(FCNVME_ASSOC_HOSTNQN_LEN, NVMF_NQN_SIZE];
>> +	 */
> What is the problem with filling all these out based on the information
> in the nvme_host structure?

Well, I want to get them from the same place that the fabrics routines 
do when they build a capsule. So they should come from the opts struct. 
It's missing the controller id, so I'll need to address that.


>
> This probably needs to be moved, similar to the patch Sagi just
> did for RDMA.  In general it might be a good idea to look at the
> various recent RDMA changes and check if they need to be brought over.

yeah - I typically do a resync every time I repost.


>
>> +	/*
>> +	 * TODO: blk_integrity_rq(rq)  for DIX
>> +	 */
> We'll hopefully be able to just move the DIX handling to common code.
> Any help appreciated..

Yes and no....    and likely a separate discussion.  If DIF is passed, 
you should involve the host port to validate on egress as well has what 
the target controller will do. Although it brings up some headaches if 
the host detects an error (e.g. protocol requires target to be part of 
it).  If DIF is inserted, the question will be whether you want to 
insert DIF at the egress point of the host port or do you pass it over 
the fabric w/o dif and have the tgt controller insert it.  I assume 
we'll need to talk more.

>
> This seems to miss reference counting on the lport and rport structure.
yes - an area of weakness right now.

> It would be good to sort this out before merging. 

I'll make a pass at it.

-- james

  reply	other threads:[~2016-08-22 17:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-23  0:23 [PATCH 3/5] nvme-fabrics: Add host FC transport support James Smart
2016-07-23  0:23 ` James Smart
2016-07-29 22:10 ` J Freyensee
2016-07-29 22:10   ` J Freyensee
2016-08-22 16:45   ` James Smart
2016-08-22 16:45     ` James Smart
2016-08-11 21:16 ` Christoph Hellwig
2016-08-11 21:16   ` Christoph Hellwig
2016-08-22 17:24   ` James Smart [this message]
2016-08-22 17:24     ` James Smart

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=892d8974-2fc9-7fac-fda5-b7c628b17906@broadcom.com \
    --to=james.smart@broadcom.com \
    --cc=hch@infradead.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.