From patchwork Wed Jun 15 15:26:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Metzmacher X-Patchwork-Id: 12882577 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A2A3CCA481 for ; Wed, 15 Jun 2022 15:29:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232421AbiFOP3A (ORCPT ); Wed, 15 Jun 2022 11:29:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356054AbiFOP2o (ORCPT ); Wed, 15 Jun 2022 11:28:44 -0400 Received: from hr2.samba.org (hr2.samba.org [IPv6:2a01:4f8:192:486::2:0]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D4D841627 for ; Wed, 15 Jun 2022 08:28:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=samba.org; s=42; h=Message-Id:Date:Cc:To:From; bh=w617rm3oZUEYJKGoyPrQTxhDUo13rDhgNJvJO7+eoSc=; b=T21IigJT9qYcPyqIPYE7rYhxGO THvKb5TtLkdaAueUtbsj/itoH3DfSDxOhzKhqhSgk+KpQ2iy3/w9esl7E0ZtG3W+mxgbVDRhcmzlV eDs26mmxLJ0EFbZHyK0OK3WR0rLM+YlRVK5D0hVU+ujHeGBvn5xCl2yI5thvrtY2v5m2AZa+lbIeQ 36zuyxXuNvGNwAflT4FGHOTKOf61wSEhqFNaCakUI/kHC8AuZKZFLxeq5soLriuaQ1EV/RQkyWP6Y ONf8frHAIwB7vRYk9/IeXgl8wWNW9Zb9uxqb+WYrAEGnbKrUlvZ08atbsHtSlRLGb2pIFfTDGfzw+ fgxu5EbddF1eN9euUr3i581SXhMf7HqNJY65j5ffck8h9cg3bMYFah0JT6oHXp3YzAulblK9X/Z41 xr8XkM3YPckykYCVxmyhDJQRUxN3dfdA/Ddg+TItE45pMmWkVUddC8VtGqK3iKqPr6jy1yVjrdYwr xFK2x5H9S+tlt3///p1/bPPM; Received: from [127.0.0.2] (localhost [127.0.0.1]) by hr2.samba.org with esmtpsa (TLS1.3:ECDHE_SECP256R1__ECDSA_SECP256R1_SHA256__CHACHA20_POLY1305:256) (Exim) id 1o1Uw7-005rvh-Sj; Wed, 15 Jun 2022 15:28:03 +0000 From: Stefan Metzmacher To: Bernard Metzler , linux-rdma@vger.kernel.org Cc: Stefan Metzmacher Subject: [PATCH v2 09/14] rdma/siw: let siw_connect() set AWAIT_MPAREP before siw_send_mpareqrep() Date: Wed, 15 Jun 2022 17:26:47 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org There's no real change made in this commit, but it makes the follwing commits easier to review. The idea is that we stay in SIW_EPSTATE_CONNECTING as long as we only deal with tcp and not started the MPA negotiation. Fixes: 6c52fdc244b5 ("rdma/siw: connection management") Signed-off-by: Stefan Metzmacher Cc: Bernard Metzler Cc: linux-rdma@vger.kernel.org --- drivers/infiniband/sw/siw/siw_cm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/sw/siw/siw_cm.c b/drivers/infiniband/sw/siw/siw_cm.c index e8e29ce609b4..c980e5035552 100644 --- a/drivers/infiniband/sw/siw/siw_cm.c +++ b/drivers/infiniband/sw/siw/siw_cm.c @@ -1438,8 +1438,6 @@ int siw_connect(struct iw_cm_id *id, struct iw_cm_conn_param *params) */ siw_cep_socket_assoc(cep, s); - cep->state = SIW_EPSTATE_AWAIT_MPAREP; - /* * Set MPA Request bits: CRC if required, no MPA Markers, * MPA Rev. according to module parameter 'mpa_version', Key 'Request'. @@ -1482,6 +1480,8 @@ int siw_connect(struct iw_cm_id *id, struct iw_cm_conn_param *params) } memcpy(cep->mpa.hdr.key, MPA_KEY_REQ, 16); + cep->state = SIW_EPSTATE_AWAIT_MPAREP; + rv = siw_send_mpareqrep(cep, params->private_data, pd_len); /* * Reset private data.