From patchwork Mon Jul 22 16:09:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Khapyorsky X-Patchwork-Id: 2831441 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 6F648C0319 for ; Mon, 22 Jul 2013 16:10:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2A7C1201F7 for ; Mon, 22 Jul 2013 16:10:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F3622201EE for ; Mon, 22 Jul 2013 16:10:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755648Ab3GVQJ7 (ORCPT ); Mon, 22 Jul 2013 12:09:59 -0400 Received: from mail-we0-f178.google.com ([74.125.82.178]:61447 "EHLO mail-we0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757458Ab3GVQJ5 (ORCPT ); Mon, 22 Jul 2013 12:09:57 -0400 Received: by mail-we0-f178.google.com with SMTP id u57so1711461wes.9 for ; Mon, 22 Jul 2013 09:09:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=3zdRTjnc2Ir7yCPWxj/jCwtONvDuVC8hT31U1GNtAzY=; b=UAC6H337own625ubqXu3GrJBkeCveg+GuKUuvH4icSmwlioI2YEaQdVS3bsOTNYb0B WLPplEKQ3F9e4+CGltLqTZFsE3MyAM4+CdbU/2lVf4luJJ0MP6xb3eXc8ptR5k5AHJJv gGdpwOxzznmprjb+pOzAWDoIXXx+FO7Uyei4AbCm4tH3ALmrTmpZLh4aa7K/9mQljIwG pmt9ih11R2nsw5rn8VugxICcDjSSJpHkHuwCkr5wj8ddhzJMWbKzw5BjQZAuJ62Up4o8 1mblPWd3ew7kGJX5SDUPqDgAS0TcOtuEbxnpnWbOY+uVZ0XfK8/H7pbRXUaBc8hUdCAI /7Ng== X-Received: by 10.180.188.97 with SMTP id fz1mr19074263wic.34.1374509395351; Mon, 22 Jul 2013 09:09:55 -0700 (PDT) Received: from gmail.com ([2.54.251.234]) by mx.google.com with ESMTPSA id h8sm41702060wie.1.2013.07.22.09.09.52 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 22 Jul 2013 09:09:54 -0700 (PDT) Date: Mon, 22 Jul 2013 19:09:49 +0300 From: Sasha Khapyorsky To: Hal Rosenstock Cc: linux-rdma@vger.kernel.org, Alex Netes , Roy.Koren@emc.com Subject: [PATCH 2/3] OpenSM: don't remove our own SM port. Message-ID: <20130722160948.GB24222@gmail.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable 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 When cleaning up remotes of non reachable ports anymore. Make exception for our own local SM port. In that case port still be in SM DB and running single port mode is possible. Signed-off-by: Sasha Khapyorsky --- opensm/osm_drop_mgr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/opensm/osm_drop_mgr.c b/opensm/osm_drop_mgr.c index b309273..5113fa2 100644 --- a/opensm/osm_drop_mgr.c +++ b/opensm/osm_drop_mgr.c @@ -114,7 +114,9 @@ static void drop_mgr_clean_physp(osm_sm_t * sm, IN osm_physp_t * p_physp) the remote port, since it is no longer reachable. This can be done if we reset the discovery count of the remote port. */ - if (!p_remote_physp->p_node->sw) { + if (!p_remote_physp->p_node->sw && + p_remote_physp->port_guid != + sm->p_subn->sm_port_guid) { p_remote_port->discovery_count = 0; OSM_LOG(sm->p_log, OSM_LOG_DEBUG, "Resetting discovery count of node: "