From patchwork Wed Jun 15 08:40:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Metzmacher X-Patchwork-Id: 12881928 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 EEC26CCA47B for ; Wed, 15 Jun 2022 08:41:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346297AbiFOIle (ORCPT ); Wed, 15 Jun 2022 04:41:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346532AbiFOIlV (ORCPT ); Wed, 15 Jun 2022 04:41:21 -0400 Received: from hr2.samba.org (hr2.samba.org [IPv6:2a01:4f8:192:486::2:0]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFDE44AE15 for ; Wed, 15 Jun 2022 01:41:20 -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=8lmA+8ryXLmsg83Rufbtg4k6StXa61BzR9Q+RfHAEIk=; b=eFdnVhYbZP4B2ZuuX1vfiy9JR8 qw5eppitylKPtuDbcjM2Vh/0EcRYFZBLhGxeTbwUBPI6NRoUooDxfwQOb0pAgZ/Bz0CN1UGRN5oWE gDij2uWq5Idxf73HXHWcww1nAEYDiuzqKZVNz3O6LXZsJ8UCu/FN/1fWXuc/AxtL4bb4oIJGe5nIg OoYaE5r7CYEtBomSkejfJGPQu1Y/UhjFDvkH2MdRVmsL0SMunqIlpzVs+0ySt6Rv1gQBYnTtLLoya IdVP4IORGfvURI3CZ5fbkxT9UApU2CrYueu4rZMR54R03hCeZpnxGLT0XKPl9nZfAk63W6MwwKTTO gHz+2afQKz6aY5OwbI1qomhxsdtULFfjUIA7AEz/fBfUOi5B/N0BXVcjgo2eDOJwBSV8Hj0EuOoia RJUS38x+XsurxojgU7jAk++kRk6+LGhRL5teBRilGOCW6qvJDBvtMp2vjyZyWC08qvvrbkzBALAYQ 4cTQwVXGs4kkk81J7n0pEvfF; 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 1o1OaU-005p9Q-Pj; Wed, 15 Jun 2022 08:41:18 +0000 From: Stefan Metzmacher To: Bernard Metzler , linux-rdma@vger.kernel.org Cc: Stefan Metzmacher Subject: [PATCH 2/7] rdma/siw: let siw_connect() set AWAIT_MPAREP before siw_send_mpareqrep() Date: Wed, 15 Jun 2022 10:40:02 +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 644c7d50e991..8d1e7f497cf9 100644 --- a/drivers/infiniband/sw/siw/siw_cm.c +++ b/drivers/infiniband/sw/siw/siw_cm.c @@ -1425,8 +1425,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'. @@ -1469,6 +1467,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.