From patchwork Tue Jul 31 16:04:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Netes X-Patchwork-Id: 1261041 X-Patchwork-Delegate: alexne@voltaire.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 07B66DF26F for ; Tue, 31 Jul 2012 16:09:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755482Ab2GaQJj (ORCPT ); Tue, 31 Jul 2012 12:09:39 -0400 Received: from mail-vb0-f46.google.com ([209.85.212.46]:54893 "EHLO mail-vb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755168Ab2GaQJi (ORCPT ); Tue, 31 Jul 2012 12:09:38 -0400 Received: by mail-vb0-f46.google.com with SMTP id ff1so5920363vbb.19 for ; Tue, 31 Jul 2012 09:09:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=ItI2Ye3By4RvwT7c4LUgc2JIYZ39W8VC0pm6mur1GqM=; b=UiyV3b4T7UXhsBjrq3T2ONUIggu+2Aw2n9glWKOjNF2vl6KE1wd+D/iUlpA+shdGvS LOvdFiLWmevtiUOMTwZOJLRLg/BWqs1Zj+TdyUfSqCBlMlGcFEU7h8NLppjtC9DcSZtb JxPWHxa1nmMFG+ZmQ31Mg9qp9p8+dq0iqOyI3K68mjW+HdBDlbUvTWRVflpNB0nTn7TR qZUxj4X3eGi34M8pD2D4fIXW3M/mEO6t+UKnGPkck8x4wcDvxj+8wgaiFP7TDRjR15nG aUvgZzS1+seSpiygSNCYy1v2pYw2SqSQnmG5/brjof7YXThsXUKeUyfq//WBHWX7kiOf ZSdw== Received: by 10.220.8.17 with SMTP id f17mr14486266vcf.20.1343750978425; Tue, 31 Jul 2012 09:09:38 -0700 (PDT) Received: from localhost ([193.47.165.251]) by mx.google.com with ESMTPS id ej4sm434499vdb.0.2012.07.31.09.09.37 (version=SSLv3 cipher=OTHER); Tue, 31 Jul 2012 09:09:37 -0700 (PDT) From: Alex Netes To: linux-rdma@vger.kernel.org Cc: Alex Netes Subject: [PATCH 25/27] Increase p_port->discovery_count only when received PortInfo for port 0 of the switch Date: Tue, 31 Jul 2012 19:04:53 +0300 Message-Id: <1343750695-28063-25-git-send-email-alexne@mellanox.com> X-Mailer: git-send-email 1.7.11.2 In-Reply-To: <1343750695-28063-1-git-send-email-alexne@mellanox.com> References: <1343750695-28063-1-git-send-email-alexne@mellanox.com> X-Gm-Message-State: ALoCoQlP8CTHTpuVL37wmyl2hI9ub0F707YLikdrTxmJnKBPEUx0tYX90RZXfAtXgDRdP9cGozvB Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Some broken SMA may respond to all MADs except of PortInfo port 0. As a result we want to drop such switch as it's not healthy. Signed-off-by: Alex Netes --- opensm/osm_port_info_rcv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/opensm/osm_port_info_rcv.c b/opensm/osm_port_info_rcv.c index ab7418b..692dc2e 100644 --- a/opensm/osm_port_info_rcv.c +++ b/opensm/osm_port_info_rcv.c @@ -568,7 +568,6 @@ void osm_pi_rcv_process(IN void *context, IN void *data) if (p_context->set_method) pi_rcv_process_set(sm, p_node, port_num, p_madw); else { - p_port->discovery_count++; /* This PortInfo arrived because we did a Get() method, @@ -600,10 +599,13 @@ void osm_pi_rcv_process(IN void *context, IN void *data) switch (osm_node_get_type(p_node)) { case IB_NODE_TYPE_CA: case IB_NODE_TYPE_ROUTER: + p_port->discovery_count++; pi_rcv_process_ca_or_router_port(sm, p_node, p_physp, p_pi); break; case IB_NODE_TYPE_SWITCH: + if (port_num == 0) + p_port->discovery_count++; pi_rcv_process_switch_port(sm, p_node, p_physp, p_pi); break; default: