From: jthumshirn@suse.de (Johannes Thumshirn)
Subject: [PATCH 2/2] lpfc: support nvmet_fc defer_rcv callback
Date: Wed, 2 Aug 2017 10:32:20 +0200 [thread overview]
Message-ID: <20170802083220.GE4256@linux-x5ow.site> (raw)
In-Reply-To: <20170801221240.31723-3-jsmart2021@gmail.com>
On Tue, Aug 01, 2017@03:12:40PM -0700, James Smart wrote:
> This patch is intended to enter the kernel through the nvme block
> tree which pulls in the nvmet_fc api change at the same time. It is
> not to be merged via the scsi trees without the latest nvme support
> in it.
This should be placed below the '---' separator, so git won't pick it up and
preserve it in the history.
[...]
>
> len += snprintf(buf+len, PAGE_SIZE-len,
> - "FCP: Rcv %08x Release %08x Drop %08x\n",
> + "FCP: Rcv %08x Defer %08x Release %08x "
> + "Drop %08x\n",
Please don't split the string across lines, it makes grepping hard.
Checkpatch actually warns you about that.
> atomic_read(&tgtp->rcv_fcp_cmd_in),
> + atomic_read(&tgtp->rcv_fcp_cmd_defer),
> atomic_read(&tgtp->xmt_fcp_release),
> atomic_read(&tgtp->rcv_fcp_cmd_drop));
>
> diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c
> index 5cc8b0f7d885..744f3f395b64 100644
> --- a/drivers/scsi/lpfc/lpfc_debugfs.c
> +++ b/drivers/scsi/lpfc/lpfc_debugfs.c
> @@ -782,8 +782,11 @@ lpfc_debugfs_nvmestat_data(struct lpfc_vport *vport, char *buf, int size)
> atomic_read(&tgtp->xmt_ls_rsp_error));
>
> len += snprintf(buf + len, size - len,
> - "FCP: Rcv %08x Drop %08x\n",
> + "FCP: Rcv %08x Defer %08x Release %08x "
> + "Drop %08x\n",
> atomic_read(&tgtp->rcv_fcp_cmd_in),
> + atomic_read(&tgtp->rcv_fcp_cmd_defer),
> + atomic_read(&tgtp->xmt_fcp_release),
> atomic_read(&tgtp->rcv_fcp_cmd_drop));
Ditto.
[...]
> + tgtp = (struct lpfc_nvmet_tgtport *)phba->targetport->private;
No need to cast from void *
[...]
> + /* Processing of FCP command is deferred */
> + if (rc == -EOVERFLOW) {
> + lpfc_nvmeio_data(phba,
> + "NVMET RCV BUSY: xri x%x sz %d from %06x\n",
> + oxid, size, sid);
> + /* defer reposting rcv buffer till .defer_rcv callback */
> + ctxp->rqb_buffer = (void *)nvmebuf;
nvmebuf is a 'struct rqb_dmabuf *' and ctxp->rqb_buffer expects 'struct
rqb_dmabuf *', why do you need a void * cast here?
--
Johannes Thumshirn Storage
jthumshirn at suse.de +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
WARNING: multiple messages have this Message-ID (diff)
From: Johannes Thumshirn <jthumshirn@suse.de>
To: James Smart <jsmart2021@gmail.com>
Cc: linux-nvme@lists.infradead.org,
Dick Kennedy <dick.kennedy@broadcom.com>,
James Smart <james.smart@broadcom.com>,
linux-scsi@vger.kernel.org
Subject: Re: [PATCH 2/2] lpfc: support nvmet_fc defer_rcv callback
Date: Wed, 2 Aug 2017 10:32:20 +0200 [thread overview]
Message-ID: <20170802083220.GE4256@linux-x5ow.site> (raw)
In-Reply-To: <20170801221240.31723-3-jsmart2021@gmail.com>
On Tue, Aug 01, 2017 at 03:12:40PM -0700, James Smart wrote:
> This patch is intended to enter the kernel through the nvme block
> tree which pulls in the nvmet_fc api change at the same time. It is
> not to be merged via the scsi trees without the latest nvme support
> in it.
This should be placed below the '---' separator, so git won't pick it up and
preserve it in the history.
[...]
>
> len += snprintf(buf+len, PAGE_SIZE-len,
> - "FCP: Rcv %08x Release %08x Drop %08x\n",
> + "FCP: Rcv %08x Defer %08x Release %08x "
> + "Drop %08x\n",
Please don't split the string across lines, it makes grepping hard.
Checkpatch actually warns you about that.
> atomic_read(&tgtp->rcv_fcp_cmd_in),
> + atomic_read(&tgtp->rcv_fcp_cmd_defer),
> atomic_read(&tgtp->xmt_fcp_release),
> atomic_read(&tgtp->rcv_fcp_cmd_drop));
>
> diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c
> index 5cc8b0f7d885..744f3f395b64 100644
> --- a/drivers/scsi/lpfc/lpfc_debugfs.c
> +++ b/drivers/scsi/lpfc/lpfc_debugfs.c
> @@ -782,8 +782,11 @@ lpfc_debugfs_nvmestat_data(struct lpfc_vport *vport, char *buf, int size)
> atomic_read(&tgtp->xmt_ls_rsp_error));
>
> len += snprintf(buf + len, size - len,
> - "FCP: Rcv %08x Drop %08x\n",
> + "FCP: Rcv %08x Defer %08x Release %08x "
> + "Drop %08x\n",
> atomic_read(&tgtp->rcv_fcp_cmd_in),
> + atomic_read(&tgtp->rcv_fcp_cmd_defer),
> + atomic_read(&tgtp->xmt_fcp_release),
> atomic_read(&tgtp->rcv_fcp_cmd_drop));
Ditto.
[...]
> + tgtp = (struct lpfc_nvmet_tgtport *)phba->targetport->private;
No need to cast from void *
[...]
> + /* Processing of FCP command is deferred */
> + if (rc == -EOVERFLOW) {
> + lpfc_nvmeio_data(phba,
> + "NVMET RCV BUSY: xri x%x sz %d from %06x\n",
> + oxid, size, sid);
> + /* defer reposting rcv buffer till .defer_rcv callback */
> + ctxp->rqb_buffer = (void *)nvmebuf;
nvmebuf is a 'struct rqb_dmabuf *' and ctxp->rqb_buffer expects 'struct
rqb_dmabuf *', why do you need a void * cast here?
--
Johannes Thumshirn Storage
jthumshirn@suse.de +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
next prev parent reply other threads:[~2017-08-02 8:32 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-01 22:12 [PATCH 0/2] nvmet_fc: work around overalloc of queue elements James Smart
2017-08-01 22:12 ` James Smart
2017-08-01 22:12 ` [PATCH 1/2] nvmet_fc: add defer_req callback for deferment of cmd buffer return James Smart
2017-08-01 22:12 ` James Smart
2017-08-02 8:16 ` Johannes Thumshirn
2017-08-02 8:16 ` Johannes Thumshirn
2017-08-02 14:29 ` James Smart
2017-08-02 14:29 ` James Smart
2017-08-10 9:04 ` Christoph Hellwig
2017-08-10 9:04 ` Christoph Hellwig
2017-08-10 9:06 ` Christoph Hellwig
2017-08-10 9:06 ` Christoph Hellwig
2017-08-16 7:53 ` Christoph Hellwig
2017-08-16 7:53 ` Christoph Hellwig
2017-08-01 22:12 ` [PATCH 2/2] lpfc: support nvmet_fc defer_rcv callback James Smart
2017-08-01 22:12 ` James Smart
2017-08-02 8:32 ` Johannes Thumshirn [this message]
2017-08-02 8:32 ` Johannes Thumshirn
2017-08-02 9:17 ` Johannes Thumshirn
2017-08-02 9:17 ` Johannes Thumshirn
2017-08-02 14:32 ` James Smart
2017-08-02 14:32 ` James Smart
2017-08-10 9:08 ` Christoph Hellwig
2017-08-10 9:08 ` Christoph Hellwig
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=20170802083220.GE4256@linux-x5ow.site \
--to=jthumshirn@suse.de \
/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.