public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Dennis Dalessandro <dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: Re: [rdma-rc 10/11] Revert "IB/core: Allow QP state transition from reset to error"
Date: Thu, 27 Jul 2017 10:52:08 -0400	[thread overview]
Message-ID: <49fe625b-cd44-137e-c001-1d85297f4e62@intel.com> (raw)
In-Reply-To: <20170726181232.7363-11-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>

On 7/26/2017 2:12 PM, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> 
> The commit ebc9ca43e1d5 ("IB/core: Allow QP state transition from reset to error")
> allowed transition from Reset to Error state for the QPs. This behavior
> doesn't follow the IBTA specification 1.3, which in 10.3.1 QUEUE PAIR AND
> EE CONTEXT STATES section.
> 
> The quote from the spec:
> "An error can be forced from any state, except Reset, with
> the Modify QP/EE Verb."
> 
> Signed-off-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> ---
>   drivers/infiniband/core/verbs.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c
> index fb98ed67d5bc..7f8fe443df46 100644
> --- a/drivers/infiniband/core/verbs.c
> +++ b/drivers/infiniband/core/verbs.c
> @@ -895,7 +895,6 @@ static const struct {
>   } qp_state_table[IB_QPS_ERR + 1][IB_QPS_ERR + 1] = {
>   	[IB_QPS_RESET] = {
>   		[IB_QPS_RESET] = { .valid = 1 },
> -		[IB_QPS_ERR] =   { .valid = 1 },
>   		[IB_QPS_INIT]  = {
>   			.valid = 1,
>   			.req_param = {
> 

The diagram from that section clearly shows you can't go from reset to 
error. However table 91 as in our original commit message says it could 
go to error from any state. Taking a step back and thinking about it, 
I'm not sure it really makes sense to be able to go from reset to error 
anyway. There is nothing that can go wrong until the qp is transitioned 
out of reset really.

Any idea why this patch was never adopted:
http://www.spinics.net/lists/linux-rdma/msg07627.html

This was during my storage hiatus so I wasn't following things RDMA back 
then. However this seems like the correct approach to me. Granted that 
patch would look different as the code has moved around but the same 
sort of check could go in ipoib_ib_dev_stop_default().

-Denny
--
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

  parent reply	other threads:[~2017-07-27 14:52 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-26 18:12 [pull request][rdma-rc 00/11] IPoIB fixes for 4.13 Leon Romanovsky
     [not found] ` <20170726181232.7363-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-07-26 18:12   ` [rdma-rc 01/11] IB/ipoib: Fix race between light events and interface restart Leon Romanovsky
2017-07-26 18:12   ` [rdma-rc 02/11] IB/ipoib: Use cancel_delayed_work_sync when needed Leon Romanovsky
2017-07-26 18:12   ` [rdma-rc 03/11] IB/ipoib: Make sure no in-flight joins while leaving that mcast Leon Romanovsky
2017-07-26 18:12   ` [rdma-rc 04/11] IB/ipoib: Prevent setting negative values to max_nonsrq_conn_qp Leon Romanovsky
2017-07-26 18:12   ` [rdma-rc 05/11] IB/ipoib: Set IPOIB_NEIGH_TBL_FLUSH after flushed completion initialization Leon Romanovsky
2017-07-26 18:12   ` [rdma-rc 06/11] IB/ipoib: Add multicast packets statistics Leon Romanovsky
2017-07-26 18:12   ` [rdma-rc 07/11] IB/ipoib: Add get statistics support to SRIOV VF Leon Romanovsky
2017-07-26 18:12   ` [rdma-rc 08/11] IB/ipoib: Clean error paths in add port Leon Romanovsky
2017-07-26 18:12   ` [rdma-rc 09/11] IB/ipoib: Remove double pointer assigning Leon Romanovsky
2017-07-26 18:12   ` [rdma-rc 10/11] Revert "IB/core: Allow QP state transition from reset to error" Leon Romanovsky
     [not found]     ` <20170726181232.7363-11-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-07-27 14:52       ` Dennis Dalessandro [this message]
     [not found]         ` <49fe625b-cd44-137e-c001-1d85297f4e62-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-07-27 14:57           ` Dennis Dalessandro
     [not found]             ` <fcacf34e-d16f-3d66-2877-be5b5993f296-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-07-30  5:17               ` Leon Romanovsky
2017-07-26 18:12   ` [rdma-rc 11/11] IB/ipoib: Notify on modify QP failure only when relevant Leon Romanovsky
     [not found]     ` <20170726181232.7363-12-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-07-27 14:59       ` Dennis Dalessandro
2017-07-27 15:05   ` [pull request][rdma-rc 00/11] IPoIB fixes for 4.13 Dennis Dalessandro
     [not found]     ` <2679977c-6258-ed15-a234-3682b8be65f3-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-07-27 15:06       ` Dennis Dalessandro
     [not found]         ` <3eb7d0e3-b1ef-533e-56ae-9cc6b65ddfc5-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-07-30  5:23           ` Leon Romanovsky
2017-08-07 17:35           ` Doug Ledford
2017-08-06  8:20   ` Leon Romanovsky
     [not found]     ` <20170806082018.GD3636-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-08-07 15:58       ` Doug Ledford

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=49fe625b-cd44-137e-c001-1d85297f4e62@intel.com \
    --to=dennis.dalessandro-ral2jqcrhueavxtiumwx3w@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox