public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Henry Orosco <henry.orosco-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	e1000-rdma-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
	Tatyana Nikolova
	<tatyana.e.nikolova-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Henry Orosco
	<henry.orosco-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: [PATCH 6/8] i40iw: Move MPA request event for loopback after connect
Date: Fri, 17 Nov 2017 10:46:55 -0600	[thread overview]
Message-ID: <20171117164657.14824-7-henry.orosco@intel.com> (raw)
In-Reply-To: <20171117164657.14824-1-henry.orosco-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

From: Tatyana Nikolova <tatyana.e.nikolova-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

For loopback, MPA request event is generated when cm_node
is initialized, which allows applications to act on the
connect request before i40iw_connect() has completed.
In some cases, the reject flow executes in parallel with
the connect flow and doesn't delete an APBVT entry,
because the apbvt_set variable is still not set by the
connect flow. Move the MPA request event to the end of
i40iw_connect() to notify application for a connect
request, after connect has completed.

Fixes: f27b4746f378 ("i40iw: add connection management code")
Signed-off-by: Tatyana Nikolova <tatyana.e.nikolova-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Henry Orosco <henry.orosco-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 drivers/infiniband/hw/i40iw/i40iw_cm.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/hw/i40iw/i40iw_cm.c b/drivers/infiniband/hw/i40iw/i40iw_cm.c
index e145417..3a35d56 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_cm.c
+++ b/drivers/infiniband/hw/i40iw/i40iw_cm.c
@@ -2947,8 +2947,6 @@ static struct i40iw_cm_node *i40iw_create_cm_node(
 			loopback_remotenode->tcp_cntxt.snd_wnd = cm_node->tcp_cntxt.rcv_wnd;
 			cm_node->tcp_cntxt.snd_wscale = loopback_remotenode->tcp_cntxt.rcv_wscale;
 			loopback_remotenode->tcp_cntxt.snd_wscale = cm_node->tcp_cntxt.rcv_wscale;
-			loopback_remotenode->state = I40IW_CM_STATE_MPAREQ_RCVD;
-			i40iw_create_event(loopback_remotenode, I40IW_CM_EVENT_MPA_REQ);
 		}
 		return cm_node;
 	}
@@ -3864,6 +3862,11 @@ int i40iw_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
 			goto err;
 	}
 
+	if (cm_node->loopbackpartner) {
+		cm_node->loopbackpartner->state = I40IW_CM_STATE_MPAREQ_RCVD;
+		i40iw_create_event(cm_node->loopbackpartner, I40IW_CM_EVENT_MPA_REQ);
+	}
+
 	i40iw_debug(cm_node->dev,
 		    I40IW_DEBUG_CM,
 		    "Api - connect(): port=0x%04x, cm_node=%p, cm_id = %p.\n",
-- 
2.8.3

--
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-11-17 16:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-17 16:46 [PATCH 0/8] i40iw: Fixes in i40iw for 4.15 Henry Orosco
     [not found] ` <20171117164657.14824-1-henry.orosco-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-11-17 16:46   ` [PATCH 1/8] i40iw: Use sqsize to initialize cqp_requests elements Henry Orosco
2017-11-17 16:46   ` [PATCH 2/8] i40iw: Allocate a sdbuf per CQP WQE Henry Orosco
     [not found]     ` <20171117164657.14824-3-henry.orosco-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-11-20 18:38       ` Jason Gunthorpe
     [not found]         ` <20171120183800.GD29075-uk2M96/98Pc@public.gmane.org>
2017-11-20 21:29           ` Shiraz Saleem
     [not found]             ` <20171120212959.GA14928-GOXS9JX10wfOxmVO0tvppfooFf0ArEBIu+b9c/7xato@public.gmane.org>
2017-11-20 21:46               ` Jason Gunthorpe
     [not found]                 ` <20171120214628.GQ29075-uk2M96/98Pc@public.gmane.org>
2017-11-21  4:12                   ` Shiraz Saleem
2017-11-17 16:46   ` [PATCH 3/8] i40iw: Do not free sqbuf when event is I40IW_TIMER_TYPE_CLOSE Henry Orosco
2017-11-17 16:46   ` [PATCH 4/8] i40iw: Correct ARP index mask Henry Orosco
2017-11-17 16:46   ` [PATCH 5/8] i40iw: Reinitialize add_sd_cnt Henry Orosco
2017-11-17 16:46   ` Henry Orosco [this message]
2017-11-17 16:46   ` [PATCH 7/8] i40iw: Notify user of established connection after QP in RTS Henry Orosco
2017-11-17 16:46   ` [PATCH 8/8] i40iw: Change accelerated flag to bool Henry Orosco
     [not found]     ` <20171117164657.14824-9-henry.orosco-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-11-20 18:39       ` Jason Gunthorpe
     [not found]         ` <20171120183954.GE29075-uk2M96/98Pc@public.gmane.org>
2017-11-20 21:31           ` Shiraz Saleem

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=20171117164657.14824-7-henry.orosco@intel.com \
    --to=henry.orosco-ral2jqcrhueavxtiumwx3w@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=e1000-rdma-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=tatyana.e.nikolova-ral2JQCrhuEAvxtiuMwx3w@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