From: swise@opengridcomputing.com (Steve Wise)
Subject: [PATCH v4 4/8] nvme-rdma: use rdma connection reject helper functions
Date: Wed, 26 Oct 2016 11:17:23 -0500 [thread overview]
Message-ID: <06fb01d22fa4$6fb83190$4f2894b0$@opengridcomputing.com> (raw)
In-Reply-To: <62db5521-9c15-146b-9057-2a22658fa210@sandisk.com>
>
> On 10/25/2016 12:34 PM, Steve Wise wrote:
> > + rej_data = (struct nvme_rdma_cm_rej *)
> > + rdma_consumer_reject_data(cm_id, ev, &rej_data_len);
>
> This cast casts away constness; that's ugly. If the data type of
> rej_data would be changed into const ... * then no cast would have been
> necessary.
>
Ok.
> > + if (rej_data && rej_data_len >= sizeof(u16)) {
> > + u16 sts = le16_to_cpu(rej_data->sts);
> >
> > dev_err(queue->ctrl->ctrl.device,
> > - "Connect rejected, status %d.", le16_to_cpu(rej-
> >sts));
> > - /* XXX: Think of something clever to do here... */
> > - } else {
> > + "Connect rejected: status %d (%s) nvme status %d
> (%s).\n",
> > + status, rej_msg, sts, nvme_rdma_cm_msg(sts));
> > + } else
> > dev_err(queue->ctrl->ctrl.device,
> > - "Connect rejected, no private data.\n");
> > - }
> > + "Connect rejected: status %d (%s).\n", status,
> rej_msg);
>
> Braces are not balanced for this if-then-else statement :-(
>
> If you have to resend this patch series please address these comments.
>
Sure, I'll spin another version with these changes. This is destined for
4.10 so we have time. :)
Thanks for reviewing!
WARNING: multiple messages have this Message-ID (diff)
From: "Steve Wise" <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
To: 'Bart Van Assche'
<bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>,
dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-nvme-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org,
hch-jcswGhMUV9g@public.gmane.org,
axboe-b10kYP2dOMg@public.gmane.org,
santosh.shilimkar-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org
Subject: RE: [PATCH v4 4/8] nvme-rdma: use rdma connection reject helper functions
Date: Wed, 26 Oct 2016 11:17:23 -0500 [thread overview]
Message-ID: <06fb01d22fa4$6fb83190$4f2894b0$@opengridcomputing.com> (raw)
In-Reply-To: <62db5521-9c15-146b-9057-2a22658fa210-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
>
> On 10/25/2016 12:34 PM, Steve Wise wrote:
> > + rej_data = (struct nvme_rdma_cm_rej *)
> > + rdma_consumer_reject_data(cm_id, ev, &rej_data_len);
>
> This cast casts away constness; that's ugly. If the data type of
> rej_data would be changed into const ... * then no cast would have been
> necessary.
>
Ok.
> > + if (rej_data && rej_data_len >= sizeof(u16)) {
> > + u16 sts = le16_to_cpu(rej_data->sts);
> >
> > dev_err(queue->ctrl->ctrl.device,
> > - "Connect rejected, status %d.", le16_to_cpu(rej-
> >sts));
> > - /* XXX: Think of something clever to do here... */
> > - } else {
> > + "Connect rejected: status %d (%s) nvme status %d
> (%s).\n",
> > + status, rej_msg, sts, nvme_rdma_cm_msg(sts));
> > + } else
> > dev_err(queue->ctrl->ctrl.device,
> > - "Connect rejected, no private data.\n");
> > - }
> > + "Connect rejected: status %d (%s).\n", status,
> rej_msg);
>
> Braces are not balanced for this if-then-else statement :-(
>
> If you have to resend this patch series please address these comments.
>
Sure, I'll spin another version with these changes. This is destined for
4.10 so we have time. :)
Thanks for reviewing!
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-10-26 16:17 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-25 20:19 [PATCH v4 0/8] connect reject event helpers Steve Wise
2016-10-25 20:19 ` Steve Wise
2016-10-25 18:33 ` [PATCH v4 1/8] rdma_cm: add rdma_reject_msg() helper function Steve Wise
2016-10-25 18:33 ` Steve Wise
2016-10-25 18:33 ` [PATCH v4 2/8] rdma_cm: add rdma_is_consumer_reject() " Steve Wise
2016-10-25 18:33 ` Steve Wise
2016-10-25 19:33 ` [PATCH v4 3/8] rdma_cm: add rdma_consumer_reject_data " Steve Wise
2016-10-25 19:33 ` Steve Wise
2016-10-25 19:34 ` [PATCH v4 4/8] nvme-rdma: use rdma connection reject helper functions Steve Wise
2016-10-25 19:34 ` Steve Wise
2016-10-26 15:26 ` Bart Van Assche
2016-10-26 15:26 ` Bart Van Assche
2016-10-26 16:17 ` Steve Wise [this message]
2016-10-26 16:17 ` Steve Wise
2016-10-26 19:39 ` Steve Wise
2016-10-26 19:39 ` Steve Wise
2016-10-26 19:51 ` Steve Wise
2016-10-26 19:51 ` Steve Wise
2016-10-25 19:35 ` [PATCH v4 5/8] ib_iser: log the connection reject message Steve Wise
2016-10-25 19:35 ` Steve Wise
2016-10-25 19:35 ` [PATCH v4 7/8] ib_isert: " Steve Wise
2016-10-25 19:35 ` Steve Wise
2016-10-26 8:30 ` Sagi Grimberg
2016-10-26 8:30 ` Sagi Grimberg
2016-10-25 19:35 ` [PATCH v4 8/8] nvmet_rdma: " Steve Wise
2016-10-25 19:35 ` Steve Wise
2016-10-26 8:30 ` Sagi Grimberg
2016-10-26 8:30 ` Sagi Grimberg
2016-10-25 19:35 ` [PATCH v4 6/8] rds_rdma: " Steve Wise
2016-10-25 19:35 ` Steve Wise
2016-10-26 8:32 ` [PATCH v4 0/8] connect reject event helpers Sagi Grimberg
2016-10-26 8:32 ` 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='06fb01d22fa4$6fb83190$4f2894b0$@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 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.