From patchwork Mon Nov 4 12:52:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 3135671 X-Patchwork-Delegate: hal@mellanox.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6B167BEEB2 for ; Mon, 4 Nov 2013 12:53:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BCCA52031C for ; Mon, 4 Nov 2013 12:53:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CB16E20265 for ; Mon, 4 Nov 2013 12:53:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751497Ab3KDMxI (ORCPT ); Mon, 4 Nov 2013 07:53:08 -0500 Received: from mail-ea0-f173.google.com ([209.85.215.173]:42312 "EHLO mail-ea0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751322Ab3KDMxH (ORCPT ); Mon, 4 Nov 2013 07:53:07 -0500 Received: by mail-ea0-f173.google.com with SMTP id g10so3414420eak.32 for ; Mon, 04 Nov 2013 04:53:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:content-type:content-transfer-encoding; bh=AVx44QyWIyvMnVHlo1fDVWOYuneTn+NANUFSZVfR6Hk=; b=YqQtHe2A8dCCYml3B10/jLz8PWj8oAtGAFgAYJ72NDNm1yU+8q8G4wGSv3+uOJx5C7 nz3pnApEZcfFuHbSgFBsXwIJPRpZrgRlprksQ/CPXlPJE5QhpgPVeAgHCrZ0fWzXxg1M Rsp5/g9V3Jdn570Fs1wBTfYRf0qMQ9m/mIz2mlsxCh4hhaHS1g9w9kOoGArb/bfxPyVV ne2oMwQ0OqmB0JGhuPIBVBavz4Eljb64P7k9o4BmwLjl2uaal5T+sEVppFfuMi04Sf1X IStbXLxDmBD01LVMEbO4DY6X8tyfXpqJrDac/rbkEBC9T8gwuhBlQuv7iYWJhPOkVjWv u1ug== X-Gm-Message-State: ALoCoQnpKMiqAstt6rdAN7rF7wEtQcS1HQCMLT6UrVUrWz2yHWURPZrUbTfLYpGywL8fLPDo6d03 X-Received: by 10.15.91.3 with SMTP id r3mr18376039eez.4.1383569585766; Mon, 04 Nov 2013 04:53:05 -0800 (PST) Received: from [192.168.1.102] (c-98-229-118-119.hsd1.ma.comcast.net. [98.229.118.119]) by mx.google.com with ESMTPSA id m54sm46263085eex.2.2013.11.04.04.53.04 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 04 Nov 2013 04:53:05 -0800 (PST) Message-ID: <527798A8.2020001@dev.mellanox.co.il> Date: Mon, 04 Nov 2013 07:52:56 -0500 From: Hal Rosenstock User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 To: "linux-rdma (linux-rdma@vger.kernel.org)" CC: Dan Ben-Yosef Subject: [PATCH opensm] Fix timeout handling for pkeyGet for sw port 0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Dan Ben Yosef Remove node in addition to port when getting timeout for pkeyGet for sw port 0. Signed-off-by: Dan Ben Yosef Signed-off-by: Hal Rosenstock --- -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/opensm/osm_drop_mgr.c b/opensm/osm_drop_mgr.c index 85a6f58..11c1561 100644 --- a/opensm/osm_drop_mgr.c +++ b/opensm/osm_drop_mgr.c @@ -535,7 +535,15 @@ void osm_drop_mgr_process(osm_sm_t * sm) drop_mgr_process_node(sm, p_node); else { /* - * Drop port if there was timeout for GetPKeyTable + * We want to preserve the configured pkey indexes, + * so if we don't receive GetResp P_KeyTable for some block, + * do the following: + * 1. Drop node if the node is sw and got timeout for port 0. + * 2. Drop node if node is HCA/RTR. + * 3. Drop only physp if got timeout for sw when the port isn't 0. + * We'll set error during initialization in order to + * cause an immediate heavy sweep and try to get the + * configured P_KeyTable again. */ if (osm_node_get_type(p_node) == IB_NODE_TYPE_SWITCH) port_num = 0; @@ -547,12 +555,12 @@ void osm_drop_mgr_process(osm_sm_t * sm) if (!p_physp || p_physp->pkeys.rcv_blocks_cnt == 0) continue; sm->p_subn->subnet_initialization_error = TRUE; - if (!port_num || osm_node_get_type(p_node) != IB_NODE_TYPE_SWITCH) { - port_guid = osm_physp_get_port_guid(p_physp); - p_port = osm_get_port_by_guid(sm->p_subn, port_guid); - p_port->discovery_count = 0; - } else + port_guid = osm_physp_get_port_guid(p_physp); + p_port = osm_get_port_by_guid(sm->p_subn, port_guid); + if (p_node->physp_discovered[port_num]) { p_node->physp_discovered[port_num] = 0; + p_port->discovery_count--; + } } } }