From nobody Fri Mar 04 15:01:26 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E027019FD5CC; Fri, 4 Mar 2022 15:01:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4K99zV5vZQz3gy8; Fri, 4 Mar 2022 15:01:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646406086; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vW64uk/5W4xRA/L5+ZfbsEbbn07VFhnb4KJPbCawCc8=; b=o1sYdJqIA/xRXdkGJey80xbjXqxYYzXoM8MZjJa+si/cPLUGnyw5/rBSxulIS9XO595gcn ZqCxfH+j8Q/zrzKKZ6SwM0tvTfJsFUwweS79kiYqiYWMBKP5JiV8WviLybrWmnK4kcZ236 UD7gC0Lj309FsKaInEqi+Alg7AkOzfjyhsNEYLq4TGLGn3/dsIr/oPnGV35+6XZ7fhHT74 YiLTV/jjT6/YWER2+thyatGEKW2nXN4EXwguVQKjrp7IojFk6cWgmvc4VSPfeS+5Dy8b/K +BUt8IzXzbJRwfeBFZVIOU/pvTiiIsRMJao+lmGkVaWykoKnef1mqZPtaISfTA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AABD164BF; Fri, 4 Mar 2022 15:01:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 224F1QhI085212; Fri, 4 Mar 2022 15:01:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 224F1QpB085211; Fri, 4 Mar 2022 15:01:26 GMT (envelope-from git) Date: Fri, 4 Mar 2022 15:01:26 GMT Message-Id: <202203041501.224F1QpB085211@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ram Kishore Vegesna Subject: git: 625a8bfb047a - main - ocs_fc: Ignore flogi failure when the remote node is pt2pt winner List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ram X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 625a8bfb047a94459b4ab41f08fe5a2c23694039 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646406086; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vW64uk/5W4xRA/L5+ZfbsEbbn07VFhnb4KJPbCawCc8=; b=q14JYeWKxSP2viGh+MQvDxW+V2oipGprOrWYrMUQnw5VsFhpbNLhQvoBEZXpMvs97NTURA Cd8Hb61EwbmwM3oJ4CY2Y2z/152cU/YVF1TB3KC85y4zouCpr8rlCoZ0NCWfgHPI/i0yAk xCMF6A0qDlUtaYIxMbEi8f/MYpUkgcwsmyXRc71EjoJjns8ucfExGkwYCxBbALugpsy/L7 SjtMp/kGhgdnvrKcMem3FeSnpOStiabAyndtwUZDm4f6KtCAbudGkwfi5liwQPYCx8G2tB xOyk62rmGfutljMW9CW8DLF/o1C3FqvVEvJueelaaxSagXRSIQ4BPqW6tRvowg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1646406086; a=rsa-sha256; cv=none; b=CEIgfvh6V+MOrjFR7x/XabZZznVwPmvpeX8CAlA8/CK5QzRHiVCmzl5/D51MWcBjkQKT9C eKcdu/eEYWqx6tMy1I7xFPi8SRlgHaThsI8RfLZOeOmMzDE3yRN32oAL2lO7F4WBDWMF04 CYd9S9mvvdkSaVN4KQcpdLrK5H5tzVzQu2Yz+8S6xHsEqBVXI2qjP/5aoDovTdApsiFqNt hVz4qDX4SbkRguZyWkpHxC05ruQzZNgBdBKc6EQa9phI0/7wKmb6CTxYEe/PZlzi3uyCyX vtoV8uh7r0vXJPRBCWq0fwgBLbc4cgMxUMr3BS4/5ojdwFz4J5Qsq/8XwEQJqw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by ram: URL: https://cgit.FreeBSD.org/src/commit/?id=625a8bfb047a94459b4ab41f08fe5a2c23694039 commit 625a8bfb047a94459b4ab41f08fe5a2c23694039 Author: Ram Kishore Vegesna AuthorDate: 2022-03-04 14:40:32 +0000 Commit: Ram Kishore Vegesna CommitDate: 2022-03-04 14:53:38 +0000 ocs_fc: Ignore flogi failure when the remote node is pt2pt winner Updated commit 79c56c9af583, do not proceed with discovery if flogi fails in pt2pt winner case. MFC after: 3 days --- sys/dev/ocs_fc/ocs_fabric.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/sys/dev/ocs_fc/ocs_fabric.c b/sys/dev/ocs_fc/ocs_fabric.c index 70b240f5de13..4fe5017e90e5 100644 --- a/sys/dev/ocs_fc/ocs_fabric.c +++ b/sys/dev/ocs_fc/ocs_fabric.c @@ -230,18 +230,14 @@ __ocs_fabric_flogi_wait_rsp(ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) } ocs_assert(node->els_req_cnt, NULL); node->els_req_cnt--; - if (node->sport->domain->attached) { - node_printf(node, "FLOGI failed, Domain already attached\n"); - if (node->sport->p2p_winner) { - node_printf(node, "p2p winner, domain already attached\n"); - ocs_node_post_event(node, OCS_EVT_DOMAIN_ATTACH_OK, NULL); - } else { - node_printf(node, "peer p2p winner, shutdown node\n"); - node->shutdown_reason = OCS_NODE_SHUTDOWN_DEFAULT; - ocs_fabric_initiate_shutdown(node); - } + + if (node->sport->topology == OCS_SPORT_TOPOLOGY_P2P && !node->sport->p2p_winner) { + node_printf(node, "FLOGI failed, peer p2p winner, shutdown node\n"); + node->shutdown_reason = OCS_NODE_SHUTDOWN_DEFAULT; + ocs_fabric_initiate_shutdown(node); break; } + node_printf(node, "FLOGI failed evt=%s, shutting down sport [%s]\n", ocs_sm_event_name(evt), sport->display_name); ocs_sm_post_event(&sport->sm, OCS_EVT_SHUTDOWN, NULL);