linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: swise@opengridcomputing.com (Steve Wise)
Subject: [PATCH v3 4/6] nvme-rdma: use rdma connection reject helper functions
Date: Tue, 25 Oct 2016 13:20:49 -0500	[thread overview]
Message-ID: <014d01d22eec$832e60e0$898b22a0$@opengridcomputing.com> (raw)
In-Reply-To: <b5d32deb-af6a-3f98-98da-c5f61d400876@sandisk.com>

> 
> On 10/24/2016 12:09 PM, Steve Wise wrote:
> > +static const char *const nvme_rdma_cm_status_strs[] = {
> > +	[NVME_RDMA_CM_INVALID_LEN]	= "invalid length",
> > +	[NVME_RDMA_CM_INVALID_RECFMT]	= "invalid record format",
> > +	[NVME_RDMA_CM_INVALID_QID]	= "invalid queue id",
> > +	[NVME_RDMA_CM_INVALID_HSQSIZE]	= "invalid host sq size",
> > +	[NVME_RDMA_CM_INVALID_HRQSIZE]	= "invalid host rq size",
> > +	[NVME_RDMA_CM_NO_RSC]		= "resource not found",
> > +	[NVME_RDMA_CM_INVALID_IRD]	= "invalid ird",
> > +	[NVME_RDMA_CM_INVALID_ORD]	= "Invalid ord",
> > +};
> 
> Please capitalize abbreviations (SQ, RQ, ID, IRD and ORD).
>

will do.

 
> > +static const char *nvme_rdma_cm_msg(enum nvme_rdma_cm_status status)
> > +{
> > +	size_t index = status;
> > +
> > +	if (index >= ARRAY_SIZE(nvme_rdma_cm_status_strs) ||
> > +	    !nvme_rdma_cm_status_strs[index])
> > +		return "unrecognized reason";
> > +	else
> > +		return nvme_rdma_cm_status_strs[index];
> > +};
> 
> Please consider rewriting this if-statement such that the recognized
> reason scenario occurs first.
>

sure.
 
> > +	rej_msg = rdma_reject_msg(cm_id, status);
> > +	rej_data = (struct nvme_rdma_cm_rej *)
> > +		   rdma_consumer_reject_data(cm_id, ev, &rej_data_len);
> 
> Please reorder the patches in this patch series such that it doesn't
> break a bisect. rdma_consumer_reject_data() should be introduced before
> it is used.
> 

rdma_consumer_reject_data() is introduced in patch 3.

  reply	other threads:[~2016-10-25 18:20 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-24 19:07 [PATCH v3 0/6] connect reject event helpers Steve Wise
2016-10-24 18:59 ` [PATCH v3 2/6] rdma_cm: add rdma_is_consumer_reject() helper function Steve Wise
2016-10-25 16:36   ` Sagi Grimberg
2016-10-25 17:00   ` Christoph Hellwig
2016-10-24 18:59 ` [PATCH v3 3/6] rdma_cm: add rdma_consumer_reject_data " Steve Wise
2016-10-25 16:36   ` Sagi Grimberg
2016-10-25 17:01   ` Christoph Hellwig
2016-10-24 18:59 ` [PATCH v3 1/6] rdma_cm: add rdma_reject_msg() " Steve Wise
2016-10-25 16:37   ` Sagi Grimberg
2016-10-25 17:00   ` Christoph Hellwig
2016-10-25 17:58   ` Bart Van Assche
2016-10-25 18:18     ` Steve Wise
2016-10-24 19:07 ` [PATCH v3 4/6] nvme-rdma: use rdma connection reject helper functions Steve Wise
2016-10-25 16:36   ` Sagi Grimberg
2016-10-25 16:58     ` Steve Wise
2016-10-25 17:02     ` Christoph Hellwig
2016-10-25 17:04       ` Sagi Grimberg
2016-10-25 17:01   ` Christoph Hellwig
2016-10-25 18:05   ` Bart Van Assche
2016-10-25 18:20     ` Steve Wise [this message]
2016-10-25 18:25       ` Bart Van Assche
2016-10-24 19:07 ` [PATCH v3 5/6] ib_iser: log the connection reject message Steve Wise
2016-10-25 16:34   ` Sagi Grimberg
2016-10-24 19:07 ` [PATCH v3 6/6] rds_rdma: " Steve Wise
2016-10-25 15:51   ` Santosh Shilimkar
2016-10-25 16:04     ` Steve Wise
2016-10-25 16:11       ` Santosh Shilimkar

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='014d01d22eec$832e60e0$898b22a0$@opengridcomputing.com' \
    --to=swise@opengridcomputing.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;
as well as URLs for NNTP newsgroup(s).